coop-deluxe / sm64coopdx

An official continuation of https://github.com/djoslin0/sm64ex-coop on sm64coopdx for the enhancements and progress it already has.
https://sm64coopdx.com
286 stars 41 forks source link

src/pc/pc_main.c:311:34: error: parameter name omitted void* main_game_init(UNUSED void*) { #190

Closed ThePlayerRolo closed 1 month ago

ThePlayerRolo commented 1 month ago

as in title

While compiling this happens every time.

I expected a full compilation

Screen Shot 2024-07-09 at 10 03 36 AM

Done with the Intel Mac Compilation tutorial

Flower35 commented 1 month ago

Ahhh, my bad. Looks like the behaviour is different depending on the gcc/clang versions?


For gcc 12.1.0 and gcc 14.1.0 (testing on MSYS2 for Win64 and on Linux x86_64), I get no warnings, untill I specify the -Wpedantic flag, which prints:

warning: ISO C does not support omitting parameter names in function definitions before C23 [-Wpedantic]

However, for gcc 9.4.0 and clang 10.0.0 (testing on WSL, Ubuntu 20.04 LTS), I've got the same error (not a warning), even without any compiler options (like -Wall -Wextra -Werror -Wpedantic)

error: parameter name omitted

This can be easily fixed by adding any name to the (already unused) parameter in function definition:

void* main_game_init(UNUSED void* dummy) {
ThePlayerRolo commented 1 month ago

how can I do this?

ThePlayerRolo commented 1 month ago

Oh I just needed to edit the c file. thanks!