Skip to content
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 function types #1737

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

michaelortmann
Copy link
Member

Found by: michaelortmann
Patch by: michaelortmann
Fixes:

One-line summary:
Fix function types

Additional description (if needed):
Some function types in eggdrop did not match.
Like a function parameter is declared as const char* in one place, but char* in another place.

Test cases demonstrating functionality (if applicable):
Fixes undefined behavior like:

.rehash
[19:42:49] tcl: builtin dcc call: *dcc:rehash -HQ 1 
[19:42:49] #-HQ# rehash
Rehashing.
[19:42:49] Writing user file...
.././console.mod/console.c:110:27: runtime error: call to function masktype through pointer to incorrect function type 'const char *(*)(int)'
/home/michael/projects/eggdrop/src/flags.c:142: note: masktype defined here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior .././console.mod/console.c:110:27 
.././console.mod/console.c:111:15: runtime error: call to function stripmasktype through pointer to incorrect function type 'const char *(*)(int)'
/home/michael/projects/eggdrop/src/cmds.c:2581: note: stripmasktype defined here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior .././console.mod/console.c:111:15 

@vanosg vanosg added this to the v1.10.1 milestone Jan 12, 2025
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