[GH-ISSUE #5421] build: Some compiler warnings with musl #2991

Closed
opened 2026-05-05 09:38:50 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @rusty-snake on GitHub (Oct 13, 2022).
Original GitHub issue: https://github.com/netblue30/firejail/issues/5421

Some compiler warnings. Not critical but they will fail the build with --enable-fatal-warnings.

Firejail: 65c5480f2f
gcc: gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219

main.c:193: warning: "LINE_MAX" redefined
  193 | #define LINE_MAX 200
      | 
In file included from /usr/include/fortify/stdlib.h:29,
                 from ../include/common.h:27,
                 from fnettrace.h:23,
                 from main.c:20:
/usr/include/limits.h:84: note: this is the location of the previous definition
   84 | #define LINE_MAX 4096
      | 
libtracelog.c:43:23: warning: 'orig_fopen64' defined but not used [-Wunused-variable]
   43 | static orig_fopen64_t orig_fopen64 = NULL;
      |                       ^~~~~~~~~~~~
libtrace.c:48:23: warning: 'orig_fopen64' defined but not used [-Wunused-variable]
   48 | static orig_fopen64_t orig_fopen64 = NULL;
      |  
Originally created by @rusty-snake on GitHub (Oct 13, 2022). Original GitHub issue: https://github.com/netblue30/firejail/issues/5421 Some compiler warnings. Not critical but they will fail the build with `--enable-fatal-warnings`. Firejail: https://github.com/netblue30/firejail/commit/65c5480f2f087ec483c240669af53bc0ebdaa2e2 gcc: `gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219` ``` main.c:193: warning: "LINE_MAX" redefined 193 | #define LINE_MAX 200 | In file included from /usr/include/fortify/stdlib.h:29, from ../include/common.h:27, from fnettrace.h:23, from main.c:20: /usr/include/limits.h:84: note: this is the location of the previous definition 84 | #define LINE_MAX 4096 | ``` ``` libtracelog.c:43:23: warning: 'orig_fopen64' defined but not used [-Wunused-variable] 43 | static orig_fopen64_t orig_fopen64 = NULL; | ^~~~~~~~~~~~ ``` ``` libtrace.c:48:23: warning: 'orig_fopen64' defined but not used [-Wunused-variable] 48 | static orig_fopen64_t orig_fopen64 = NULL; | ```
Author
Owner

@reinerh commented on GitHub (Oct 14, 2022):

Interesting that it doesn't happen in the CI, where fatal warnings are enabled.

<!-- gh-comment-id:1279109419 --> @reinerh commented on GitHub (Oct 14, 2022): Interesting that it doesn't happen in the CI, where fatal warnings are enabled.
Author
Owner

@reinerh commented on GitHub (Oct 23, 2022):

The difference to our CI is that Alpine builds with musl.

@rusty-snake Can you please try building on Alpine with #5431?

<!-- gh-comment-id:1288118190 --> @reinerh commented on GitHub (Oct 23, 2022): The difference to our CI is that Alpine builds with musl. @rusty-snake Can you please try building on Alpine with #5431?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#2991
No description provided.