-
Notifications
You must be signed in to change notification settings - Fork 21
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 compilation for GCC 15 + start covering GCC 15 in CI (fixes #40) #42
Merged
davidpolverari
merged 7 commits into
resurrecting-open-source-projects:master
from
hartwork:issue-40-fix-compilation-for-gcc-15
Dec 24, 2024
Merged
Fix compilation for GCC 15 + start covering GCC 15 in CI (fixes #40) #42
davidpolverari
merged 7 commits into
resurrecting-open-source-projects:master
from
hartwork:issue-40-fix-compilation-for-gcc-15
Dec 24, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Symptom was: > In file included from system.h:268, > from dcfldd.h:42, > from dcfldd.c:33: > sys2.h:297:7: error: conflicting types for 'ttyname'; have 'char *(void)' > 297 | char *ttyname (); > | ^~~~~~~ > In file included from system.h:33: > /usr/include/unistd.h:799:14: note: previous declaration of 'ttyname' with type 'char *(int)' > 799 | extern char *ttyname (int __fd) __THROW; > | ^~~~~~~
Symtom was: > In file included from xstrtoul.c:9: > xstrtol.c:82:10: error: conflicting types for 'strtol'; have 'long int(void)' > 82 | long int strtol (); > | ^~~~~~ > In file included from /usr/include/features.h:510, > from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33, > from /usr/include/stdio.h:28, > from xstrtol.c:32: > /usr/include/stdlib.h:215:17: note: previous declaration of 'strtol' with type 'long int(const char * restrict, char ** restrict, int)' > 215 | extern long int __REDIRECT_NTH (strtol, (const char *__restrict __nptr, > | ^~~~~~~~~~~~~~ > xstrtol.c:86:19: error: conflicting types for 'strtoul'; have 'long unsigned int(void)' > 86 | unsigned long int strtoul (); > | ^~~~~~~ > /usr/include/stdlib.h:219:26: note: previous declaration of 'strtoul' with type 'long unsigned int(const char * restrict, char ** restrict, int)' > 219 | extern unsigned long int __REDIRECT_NTH (strtoul, > | ^~~~~~~~~~~~~~ > xstrtol.c:90:11: error: conflicting types for 'strtoumax'; have 'uintmax_t(void)' {aka 'long unsigned int(void)'} > 90 | uintmax_t strtoumax (); > | ^~~~~~~~~
.. and make it consistent with the other places defining it. With this patch: > # git --no-pager grep "if.*PROTOTYPES" > src/argmatch.h:# if defined PROTOTYPES || (defined (__STDC__) && __STDC__) > src/human.h:# if defined PROTOTYPES || (defined __STDC__ && __STDC__) > src/long-options.h:# if defined PROTOTYPES || (defined __STDC__ && __STDC__) > src/safe-read.h:# if defined PROTOTYPES || (defined __STDC__ && __STDC__) > src/sys2.h:# if defined PROTOTYPES || (defined __STDC__ && __STDC__) > src/version-etc.h:# if defined PROTOTYPES || (defined __STDC__ && __STDC__) > src/xalloc.h:# if defined PROTOTYPES || (defined __STDC__ && __STDC__) > src/xstrtol.h:# if defined PROTOTYPES || (defined __STDC__ && __STDC__) Symptom was: > dcfldd.c: In function 'print_stats': > dcfldd.c:229:13: error: too many arguments to function 'human_readable' > 229 | human_readable (r_full, buf[0], 1, 1), > | ^~~~~~~~~~~~~~ > In file included from dcfldd.c:60: > human.h:33:7: note: declared here > 33 | char *human_readable PARAMS ((uintmax_t, char *, int, int)); > | ^~~~~~~~~~~~~~ > dcfldd.c:230:13: error: too many arguments to function 'human_readable' > 230 | human_readable (r_partial, buf[1], 1, 1)); > | ^~~~~~~~~~~~~~ > human.h:33:7: note: declared here > 33 | char *human_readable PARAMS ((uintmax_t, char *, int, int)); > | ^~~~~~~~~~~~~~ > dcfldd.c:232:13: error: too many arguments to function 'human_readable' > 232 | human_readable (w_full, buf[0], 1, 1), > | ^~~~~~~~~~~~~~ > human.h:33:7: note: declared here > 33 | char *human_readable PARAMS ((uintmax_t, char *, int, int)); > | ^~~~~~~~~~~~~~ > dcfldd.c:233:13: error: too many arguments to function 'human_readable' > 233 | human_readable (w_partial, buf[1], 1, 1)); > | ^~~~~~~~~~~~~~ > human.h:33:7: note: declared here > 33 | char *human_readable PARAMS ((uintmax_t, char *, int, int)); > | ^~~~~~~~~~~~~~ > dcfldd.c:236:17: error: too many arguments to function 'human_readable' > 236 | human_readable (r_truncate, buf[0], 1, 1), > | ^~~~~~~~~~~~~~ > human.h:33:7: note: declared here > 33 | char *human_readable PARAMS ((uintmax_t, char *, int, int)); > | ^~~~~~~~~~~~~~
Symptom was: > md5.c: In function 'MD5Init': > md5.c:83:6: warning: old-style function definition [-Wold-style-definition] > 83 | void MD5Init (mdContext) > | ^~~~~~~ > md5.c: In function 'MD5Update': > md5.c:96:6: warning: old-style function definition [-Wold-style-definition] > 96 | void MD5Update (mdContext, inBuf, inLen) > | ^~~~~~~~~ > [..] > md5.c: In function 'MD5Final': > md5.c:131:6: warning: old-style function definition [-Wold-style-definition] > 131 | void MD5Final (mdContext, buf) > | ^~~~~~~~ > [..] > md5.c: In function 'MD5Sprint': > md5.c:175:6: warning: old-style function definition [-Wold-style-definition] > 175 | void MD5Sprint (mdContext, buf) > | ^~~~~~~~~ > md5.c: In function 'Transform': > md5.c:187:13: warning: old-style function definition [-Wold-style-definition] > 187 | static void Transform (buf, in) > | ^~~~~~~~~
Symptom was: > md5.c: In function 'MD5Update': > md5.c:121:7: error: too many arguments to function 'Transform' > 121 | Transform (mdContext->buf, in); > | ^~~~~~~~~ > md5.c:38:13: note: declared here > 38 | static void Transform (); > | ^~~~~~~~~ > md5.c: In function 'MD5Final': > md5.c:151:3: error: too many arguments to function 'Transform' > 151 | Transform (mdContext->buf, in); > | ^~~~~~~~~ > md5.c:38:13: note: declared here > 38 | static void Transform (); > | ^~~~~~~~~
Symptom was: > long-options.c:51:1: error: conflicting types for 'parse_long_options'; have 'void(int, char **, const char *, const char *, const char *, const char *, void (*)(void))' > 51 | parse_long_options (int argc, > | ^~~~~~~~~~~~~~~~~~ > In file included from long-options.c:30: > long-options.h:29:3: note: previous declaration of 'parse_long_options' with type 'void(int, char **, const char *, const char *, const char *, const char *, void (*)(int))' > 29 | parse_long_options PARAMS ((int _argc, > | ^~~~~~~~~~~~~~~~~~ > long-options.c: In function 'parse_long_options': > long-options.c:73:12: error: too many arguments to function 'usage_func' > 73 | (*usage_func) (0); > | ~^~~~~~~~~~~~
LGTM. Merging. Happy Xmas! |
davidpolverari
merged commit Dec 24, 2024
cffab09
into
resurrecting-open-source-projects:master
5 checks passed
@davidpolverari happy Christmas to you too! 🙏 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #40