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 compile with gcc 14.2.1 #1594

Merged
merged 3 commits into from
Nov 3, 2024
Merged

Conversation

Waqar144
Copy link
Contributor

@Waqar144 Waqar144 commented Nov 1, 2024

Fixes -Werror=maybe-uninitialized warnings

Fixes -Werror=maybe-uninitialized warnings
@Waqar144
Copy link
Contributor Author

Waqar144 commented Nov 1, 2024

There are also -Werror=format-overflow warnings in file_utils.c file_append_path_temp():

sprintf(path_buffer, "%s/%s", path, name);
...
sprintf(path_buffer, "%s%s", path, name);

I just locally added -Wno-format-overflow to avoid them for now.

@lerno
Copy link
Collaborator

lerno commented Nov 2, 2024

Could we instead set these to an invalid value? So rather than null, perhaps (void*)-1, and the len similarly. The best would be to add a #define like #define NO_INIT_PTR (void*)0xAAAAAAAA or something.

@lerno lerno merged commit 2138312 into c3lang:master Nov 3, 2024
42 checks passed
@lerno
Copy link
Collaborator

lerno commented Nov 3, 2024

Thank you!

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