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

cpu/native: fix compilation with GCC 14.1 #20722

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cpu/native/startup.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@
typedef void (*init_func_t)(int argc, char **argv, char **envp);
#ifdef __APPLE__
/* Taken from the sources of Apple's dyld launcher
* https://github.com/opensource-apple/dyld/blob/3f928f32597888c5eac6003b9199d972d49857b5/src/dyldInitialization.cpp#L85-L104

Check warning on line 453 in cpu/native/startup.c

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
*/
/* Find the extents of the __DATA __mod_init_func section */
extern init_func_t __init_array_start __asm("section$start$__DATA$__mod_init_func");
Expand Down Expand Up @@ -480,7 +480,7 @@
const size_t argc_max = 32;
size_t cmdlen = 0;
char *cmdline = malloc(bufsize);
argv = calloc(sizeof(char *), argc_max);
argv = calloc(argc_max, sizeof(char *));
argc = 0;
envp = NULL;
expect(cmdline != NULL);
Expand Down
Loading