Skip to content

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 <geoffrey.parker@arthrex.com>
Copy link

@joergneulist joergneulist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a simple change and I arrived at the same solution independently. Looks good!

@joergneulist
Copy link

Thank you @kk6ho! I just made the same fix and wanted to place a pull request :-) So I absolutely second merging this, @godspeed1989

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.

2 participants