[Hamlib-developer] [Hamlib/Hamlib] 279362: tests: fix compilation with modern compilers
Library to control radio transceivers and receivers
Brought to you by:
n0nb
|
From: Michael B. <no...@gi...> - 2024-04-03 22:06:21
|
Branch: refs/heads/master Home: https://github.com/Hamlib/Hamlib Commit: 279362f40347d92c5623702297c48621334df7e3 https://github.com/Hamlib/Hamlib/commit/279362f40347d92c5623702297c48621334df7e3 Author: Eli Schwartz <esc...@gm...> Date: 2024-04-03 (Wed, 03 Apr 2024) Changed paths: M tests/memload.c Log Message: ----------- tests: fix compilation with modern compilers GCC 14 and clang 16, after 20+ years, finally enforce c99 language requirements. Previously, to keep old code compiling, the use of K&R C constructs was simply allowed despite the standard, and so users could accidentally use those constructs without realizing it or being warned. Now, the compiler fatally errors out when encountering the problematic code. This can also be observed in older versions of the compiler by using the following flags: ``` -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types ``` In hamlib's case, the use of a function without declaring it is illegal. It's also a very simple fix though -- the standard header which declared the stdlib exit() function was forgotten and never included. Simply add the missing include, and make the source code automatically compliant. Bug: https://bugs.gentoo.org/923108 Commit: 00ceb6e72f1f5c4d58afc090bae5c327dccfd97c https://github.com/Hamlib/Hamlib/commit/00ceb6e72f1f5c4d58afc090bae5c327dccfd97c Author: Michael Black <mdb...@ya...> Date: 2024-04-03 (Wed, 03 Apr 2024) Changed paths: M tests/memload.c Log Message: ----------- Merge pull request #1537 from eli-schwartz/c99-porting tests: fix compilation with modern compilers Compare: https://github.com/Hamlib/Hamlib/compare/9a7dda25c888...00ceb6e72f1f To unsubscribe from these emails, change your notification settings at https://github.com/Hamlib/Hamlib/settings/notifications |