Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix configure test for gcc 14: avoid implicit funcition decl. for main() #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kk6ho
Copy link

@kk6ho kk6ho commented Jan 6, 2025

Change the implicit return type of int in the embeded test.c program in the configure script to explicit "int main()".

This was a warning in previous gcc versions, but in gcc 14 this produces an error resulting the LIBS variable being empty in the generated Make.conf, and compile errors due to missing jpeg support, etc.

from bad config.log:

...

infodir = /usr/local/info
$$~test.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main()
| ^~~~
libjpeg: no
$$~test.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main()
| ^~~~
libpng: no
bmp: yes
fb: /dev/fb0
LIBS =
...

Change the implicit return type of int in the embeded test.c program in
the configure script to explicit "int main()".

This was a warning in previous gcc versions, but in gcc 14 this produces
an error resulting the LIBS variable being empty in the generated
Make.conf, and compile errors due to missing jpeg support, etc.

from bad config.log:

    ...
   infodir = /usr/local/info
   $$~test.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
       1 | main()
         | ^~~~
   libjpeg: no
   $$~test.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
       1 | main()
         | ^~~~
   libpng: no
   bmp: yes
   fb: /dev/fb0
   LIBS    =
   ...

Signed-off-by: Geoff Parker <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant