Skip to content

Fix FTBFS with recent GCC#3633

Merged
bogdan-iancu merged 1 commit into
OpenSIPS:masterfrom
lemenkov:strict_type_checking
Apr 24, 2025
Merged

Fix FTBFS with recent GCC#3633
bogdan-iancu merged 1 commit into
OpenSIPS:masterfrom
lemenkov:strict_type_checking

Conversation

@lemenkov
Copy link
Copy Markdown
Contributor

Summary
This PR fixes building with a very modern GCC which does even better type checking.

Details
GCC 15 treats declarations like int foo(); differently. In C23 (a default for GCC 15), it's equivalent to int foo(void); whereas, in earlier versions of C, such a declaration plays fast and loose with the type system — essentially meaning, "we don't know how many parameters this function takes or their types; let's hope your code is correct!".

I've updated code accordingly and fixed other type incompatibility.

Compatibility
Builds file with both modern GCC 15 and older version.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
@bogdan-iancu bogdan-iancu merged commit 4f1059b into OpenSIPS:master Apr 24, 2025
72 checks passed
bogdan-iancu added a commit that referenced this pull request Apr 24, 2025
Fix FTBFS with recent GCC

(cherry picked from commit 4f1059b)
bogdan-iancu added a commit that referenced this pull request Apr 24, 2025
Fix FTBFS with recent GCC

(cherry picked from commit 4f1059b)
NormB pushed a commit to NormB/opensips that referenced this pull request May 9, 2026
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