Skip to content

Comments

Fix for -Wstrict-overflow=3#1863

Merged
vanosg merged 1 commit intoeggheads:developfrom
michaelortmann:strict-overflow
Dec 6, 2025
Merged

Fix for -Wstrict-overflow=3#1863
vanosg merged 1 commit intoeggheads:developfrom
michaelortmann:strict-overflow

Conversation

@michaelortmann
Copy link
Member

Found by: https://github.com/michaelortmann
Patch by: https://github.com/michaelortmann
Fixes:

One-line summary:
Fix for -Wstrict-overflow=3

Additional description (if needed):

gcc -fPIC -std=gnu99 -Wstrict-overflow=3 -pipe -Wall -I. -I../../.. -I../../.. -I../../../src/mod  -DHAVE_CONFIG_H -I/usr/include  -DMAKING_MODS -c .././filesys.mod/filesys.c && mv -f filesys.o ../
.././filesys.mod/filesys.c: In function ‘mktempfile’:
.././filesys.mod/filesys.c:714:3: warning: assuming signed overflow does not occur when changing X +- C1 cmp C2 to X cmp C2 -+ C1 [-Wstrict-overflow]
  714 |   if ((l + MKTEMPFILE_TOT) > NAME_MAX) {
      |   ^~

Test cases demonstrating functionality (if applicable):

@vanosg vanosg added this to the v1.10.2 milestone Dec 6, 2025
@vanosg vanosg merged commit f802929 into eggheads:develop Dec 6, 2025
26 checks passed
@michaelortmann michaelortmann deleted the strict-overflow branch December 6, 2025 19:52
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.

2 participants