Closed ekulabuhov closed 3 months ago
Hi, please see my remarks below on these changes:
1/ change to input.c : Ok with correction (it's strange that it results in a compilation error though, have you added -Werror compilation flag ?)
2/ change to m68k.h : a better correction to this compilation error would be to replace
#include "shared.h
in config.h by #include "types.h"
and #include "input.h"
to only include the needed types definition (and do not include m68k.h from shared.h as it conflicts with platform specific types and is not needed for compiling platform specific code)
3/ change to Makefile: I don't understand this change. It seems you are instead adding -Wstrict-prototypes and -Winvalid-utf8 to all platforms except OSX (ifneq means "if not equal" so platform variable is set to "osx" wh⁵en "DARWIN" string is NOT found in ushell return ?). This is confirmed by the compilation output you copypasted above where those two extra warning options appear although they are not in original Makefile, which serms to indicate you added them yourself for some unknown reason (which then produced those compilation errors)
Hi! Thanks for your comments! I will check 2.
Regarding 3 - I've picked up platform detection from libretro Makefile: https://github.com/ekeeke/Genesis-Plus-GX/blob/c6d1e5ac38ec768fcf4a93e37dd44088473f5001/Makefile.libretro#L27
I think it checks that output of findstring Darwin
against $(shell uname -a)
is not empty (hence the use of ifneq).
Please ignore the extra flags in gcc call for error 2, I was doing things in reverse to generate errors. I assure you that neither flags are there by default.
From the gcc doc for -Winvalid-utf8:
Warn if an invalid UTF-8 character is found. This warning is on by default for C++23 if -finput-charset=UTF-8 is used and turned into error with -pedantic-errors.
I believe the culprit that turns these simple warnings into errors is -pedantic-errors
that is present by default. And adding -Winvalid-utf8 -Wstrict-prototypes
turns them back into warnings.
Thanks, I indeed misunderstood how the findstring command works in Makefile.
You are probably right about -pedantic-errors error forced warning being turned into normal warnings with -W options.
Hey! I've ran into some minor issues while trying to compile SDL2 Makefile on MacOS Ventura 13.6.4. This PR aims to fix them.
Error 1 (fixed by adding a newline):
Error 2 (fixed by replacing define with typedef):
Error 3 (fixed by suppressing error using -Wstrict-prototypes): :
Error 4 (fixed by suppressing error using -Winvalid-utf8):