-
Notifications
You must be signed in to change notification settings - Fork 31
Fixes/updates for compilation under gcc 15.1.0 -Wall -Wextra -Werror #120
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
base: devel
Are you sure you want to change the base?
Conversation
…acket for all sec-types.
gcc-15.1.0 throws an error on declaration/definition mismatches. /p/vast1/rountree/repos/Spindle/src/client/biter/../../biter/linux_ids.c:27:14: error: conflicting types for ‘biterc_get_rank’; have ‘unsigned int(int)’ /p/vast1/rountree/repos/Spindle/src/client/biter/../../biter/shmutil.c:242:6: error: conflicting types for ‘update_shm_id’; have ‘void(shminfo_t *)’ /p/vast1/rountree/repos/Spindle/src/client/client/remap_exec.c:168:6: error: conflicting types for ‘remap_executable’; have ‘void(int)’ Updates header files in each case. Passes runTests.
Spindle/src/client/client/exec_util.c:201:21: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] Fixed by strdup-ing string to preserve constness of original. Spindle/src/server/cache/../../utils/pathfn.c:61:4: warning: ‘strncpy’ output may be truncated copying between 0 and 4096 bytes from a string of length 4096 [-Wstringop-truncation] Code is correct but the compiler can't deduce that. Replaced strncpy() with strdup()+snprintf(). https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8#forming_truncated_strings_with_strncat
Spindle/src/server/auditserver/ldcs_audit_server_handlers.c:1442:10: warning: this statement may fall through [-Wimplicit-fallthrough=] Solved with magic comment. https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7 Spindle/src/fe/startup/config_mgr.cc:808:13: warning: this statement may fall through [-Wimplicit-fallthrough=] Actual error, fixed by adding missing break. Spindle/testsuite/symbind_test.c:310:7: warning: missing initializer for field ‘matched’ of ‘test_bindings_t’ [-Wmissing-field-initializers] Added missing NULL to intializaiton.
/p/vast1/rountree/repos/Spindle/src/client/biter/../../biter/shmutil.c:45:43: Split out pid_t and locks into their own variables/arrays. Affects lock_t, base_header_t, biter_header_t, and shmcache_header_t. /p/vast1/rountree/repos/Spindle/src/client/biter/../../biter/demultiplex.c:197:17: Changed type of msg_header_t.msg_target from uint32_t to int (src/biter/demultiplex.h) /p/vast1/rountree/repos/Spindle/src/client/auditclient/writablegot.c:121:21: Cribbed from earlier solution. /p/vast1/rountree/repos/Spindle/src/client/client/../../utils/parseloc.c:250:15: Cribbed. /p/vast1/rountree/repos/Spindle/src/client/client/../../utils/fileutil.c:84:25: Cribbed. /p/vast1/rountree/repos/Spindle/src/client/client/remap_exec.c:94:33: Cribbed. /p/vast1/rountree/repos/Spindle/src/client/client/intercept_readlink.c:147:12: Cribbed. /p/vast1/rountree/repos/Spindle/src/client/client_comlib/client_api_socket.c:237:11: Cribbed early solution. /p/vast1/rountree/repos/Spindle/src/client/client_comlib/client_api.c:235:22: Trickier than most, as the code is dependent on the size of the variables in question. /p/vast1/rountree/repos/Spindle/src/client/client/realpath.c:369:17: In the interest of tracking the original glibc code, disable this warning. /p/vast1/rountree/repos/Spindle/src/client/subaudit/update_pltbind.c:185:18: Cribbed. /p/vast1/rountree/repos/Spindle/src/server/biter/../../biter/biterd.c:90:18: Cribbed. /p/vast1/rountree/repos/Spindle/src/server/cache/global_name.c:71:11: int->size_t /p/vast1/rountree/repos/Spindle/src/server/cobo/../../cobo/cobo.c:477:25: Replaced inet_addr() call with intel_aton() per man page recommendation. /p/vast1/rountree/repos/Spindle/src/server/cobo/../../cobo/handshake.c:689:22: warning: Used ssize_t to allow errors and data to share the same channel. /p/vast1/rountree/repos/Spindle/src/server/comlib/ldcs_api_socket.c:291:11: Duplicated code... /p/vast1/rountree/repos/Spindle/src/server/comlib/ldcs_api_pipe.c: In function ‘ldcs_send_msg_pipe’: Familiar issue of read/write returning ints and those sizes being stored in size_ts. /p/vast1/rountree/repos/Spindle/src/server/auditserver/ldcs_elf_read.c: In function ‘readUpTo’: Interesting that fread does not return an error condition, nor does it set errno.o /p/vast1/rountree/repos/Spindle/src/server/auditserver/ldcs_audit_server_requestors.c: In function ‘get_requestor’: Cribbed. /p/vast1/rountree/repos/Spindle/src/server/auditserver/ldcs_audit_server_numa.c: In function ‘pattern_match’: Cribbed. src/server/auditserver/ldcs_audit_server_handlers.c Nothing remarkable. Passes runTests.
|
This looks like it needs a rebase. Existing commits from both Nick and I are in here with changed hashes. |
|
I closed out the other warning cleanup PR; this PR replaces it. I'll get a rebase committed later this morning. |
|
Just a single file needed cleanup. Compiles without errors or warning with |
Fixes and updates to compile under gcc 15.1.0 with the flags
-Wall,-Wextra, and-Werror.Commits are based on the class of errors/warnings rather than files.
Fixes #94