Skip to content

Fix most sa2 warnings under macOS#343

Closed
sh95014 wants to merge 2 commits intoaudetto:masterfrom
sh95014:sa2-warnings
Closed

Fix most sa2 warnings under macOS#343
sh95014 wants to merge 2 commits intoaudetto:masterfrom
sh95014:sa2-warnings

Conversation

@sh95014
Copy link
Copy Markdown

@sh95014 sh95014 commented Jan 13, 2026

  • replace uses of dangerous sprintf() with snprintf()
  • remove no-op references to deprecated register_poll_fd and unregister_poll_fd in libslirp 4.9.1
  • match upstream zutil.h to avoid duplicate #define of OS_CODE and a clash with fdopen in system headers

- sprintf → snprintf
- avoid deprecated register_poll_fd and unregister_poll_fd in libslirp
- match upstream zutil.h to avoid duplicate #define of OS_CODE and fdopen clash
audetto added a commit that referenced this pull request Jan 31, 2026
Avoid unsafe usage of sprintf.

Partially #343
Hancock33 added a commit to Hancock33/batocera.piboy that referenced this pull request Feb 1, 2026
---------------------------------------------------------------------------------------
applewin.mk 6df951ec323e92103d9e6edce9c5fa2a0117759a # Version: Commits on Jan 31, 2026
---------------------------------------------------------------------------------------
Merge pull request #352 from audetto/warnings

Avoid unsafe usage of sprintf.

Partially audetto/AppleWin#343,

------------------------------------------------------------------------------------------
duckstation.mk 0f280acaa73b8d5a08cba90b4867d90dc8af94e0 # Version: Commits on Jan 31, 2026
------------------------------------------------------------------------------------------
InputManager: Remove padding from struct

No longer necessary since it's not shared between threads.,

--------------------------------------------------------------------------------------
openmsx.mk 5a13c861edd4e7257f29cd9a567c0aac4fec2365 # Version: Commits on Jan 31, 2026
--------------------------------------------------------------------------------------
Merge branch 'jeangit-colorblind',

-------------------------------------------------------------------------------------
ppsspp.mk a452aede2c5cec1062152bcec83bebe16c9aaf2e # Version: Commits on Jan 31, 2026
-------------------------------------------------------------------------------------
Merge pull request #21182 from oltolm/d3d11_cleanup

d3d11: remove unnecessary workaround,

------------------------------------------------------------------------------------------------
libretro-mame-src.mk e05906f56932bf4dab96f3e136d2c44a96799f6f # Version: Commits on Jan 31, 2026
------------------------------------------------------------------------------------------------
Merge remote-tracking branch 'upstream/master',

--------------------------------------------------------------------------------------------
vpinball-next.mk 33b2e10b2f045ee2803bfceea55b840af8d612a4 # Version: Commits on Jan 31, 2026
--------------------------------------------------------------------------------------------
PinMAME: latest (fix PWM GTS80),

-----------------------------------------------------------------------------------------
sonic3-air.mk 6536582fa0cd2375b14de7b92e233c96a410b97f # Version: Commits on Jan 31, 2026
-----------------------------------------------------------------------------------------
Updated Oxygen Handbook with information about arrays (on page 11),

----------------------------------------------------------------------------------
trx.mk 3b6bf1835e814e408cad0446346cd2992f2483f8 # Version: Commits on Jan 30, 2026
----------------------------------------------------------------------------------
phase/executor: fix interrupts not skipping fade-outs,

------------------------------------------------------------------------------------------
xash3d-fwgs.mk cca6f8da2d723e55ec1460d28a0fd6efe8488594 # Version: Commits on Jan 31, 2026
------------------------------------------------------------------------------------------
engine: platform: sdl2: more robust error handling when creating a window and opengl context,

-----------------------------------------------------------------------------------------------
libretro-bennugd.mk 115b4019d4e555024eb7a5a1793260e268a8087e # Version: Commits on Jan 30, 2026
-----------------------------------------------------------------------------------------------
fix per frame audio upload when the audio callback is not available,

----------------------------------------------------------------------------------------------
libretro-ppsspp.mk a452aede2c5cec1062152bcec83bebe16c9aaf2e # Version: Commits on Jan 31, 2026
----------------------------------------------------------------------------------------------
Merge pull request #21182 from oltolm/d3d11_cleanup

d3d11: remove unnecessary workaround,
@ryandesign
Copy link
Copy Markdown

  • match upstream zutil.h to avoid duplicate #define of OS_CODE and a clash with fdopen in system headers

This change is no longer needed; it was already included in the complete update to zlib 1.3.2 in 2465aef.

@audetto audetto closed this Mar 29, 2026
@sh95014
Copy link
Copy Markdown
Author

sh95014 commented Mar 29, 2026

@audetto I think you might’ve misunderstood @ryandesign’s comments. The zutil.h changes are no longer needed, but the other two bullet items are still real.

@audetto
Copy link
Copy Markdown
Owner

audetto commented Mar 29, 2026

snprintf is done, zutil too, slirp is not good.

If you still want to merge something aboutslirp, probably better in a new PR addressing the comments in a way which is backward compatible.

@sh95014
Copy link
Copy Markdown
Author

sh95014 commented Mar 29, 2026

@audetto What are the comments about the slirp changes? I’m not seeing anything…

@audetto
Copy link
Copy Markdown
Owner

audetto commented Mar 29, 2026

image

@audetto
Copy link
Copy Markdown
Owner

audetto commented Mar 29, 2026

Probably these are private comments that nobody else can see. They should make it more explicit.

You will need to do something using SLIRP_CONFIG_VERSION_MAX because if I remove them, I get a segfault.

https://gitlab.com/qemu-project/libslirp/-/commit/c0916cf0710ae72fabf131c18a4a922f3cb19702?view=parallel#bb39274a63531fe7bbc3eb3dff69b25f26ed9e3a

Probably based on SLIRP_CONFIG_VERSION_MAX <= 5

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.

3 participants