Skip to content

Commit

Permalink
crt0: explicitly 0 unused argc/argv
Browse files Browse the repository at this point in the history
  • Loading branch information
ppannuto authored and bradjc committed Jan 24, 2024
1 parent f628596 commit 67fae27
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libtock/crt0.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#error Fixed STACK_SIZE.
#endif

extern int main(void);
extern int main(int argc, char *argv[]);

// Allow _start to go undeclared
#pragma GCC diagnostic ignored "-Wmissing-declarations"
Expand Down Expand Up @@ -328,7 +328,7 @@ void _c_start_pic(uint32_t app_start, uint32_t mem_start) {
}
}

exit(main());
exit(main(0, NULL));
}

// C startup routine for apps compiled with fixed addresses (i.e. no PIC).
Expand Down Expand Up @@ -362,5 +362,5 @@ void _c_start_nopic(uint32_t app_start, uint32_t mem_start) {
char* bss_start = (char*)(myhdr->bss_start + mem_start);
memset(bss_start, 0, myhdr->bss_size);

exit(main());
exit(main(0, NULL));
}

0 comments on commit 67fae27

Please sign in to comment.