Skip to content

Commit 9ec4e38

Browse files
[3.14] gh-138264: Fix gcc 14 compiler warnings (GH-138265) (GH-138426)
(cherry picked from commit 4a33077)
1 parent 537b558 commit 9ec4e38

File tree

6 files changed

+23
-23
lines changed

6 files changed

+23
-23
lines changed

Include/internal/pycore_stats.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ PyAPI_FUNC(PyObject*) _Py_GetSpecializationStats(void);
7777
#define RARE_EVENT_INTERP_INC(interp, name) \
7878
do { \
7979
/* saturating add */ \
80-
int val = FT_ATOMIC_LOAD_UINT8_RELAXED(interp->rare_events.name); \
80+
uint8_t val = FT_ATOMIC_LOAD_UINT8_RELAXED(interp->rare_events.name); \
8181
if (val < UINT8_MAX) { \
8282
FT_ATOMIC_STORE_UINT8(interp->rare_events.name, val + 1); \
8383
} \

Lib/test/test_generated_cases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1601,7 +1601,7 @@ def test_instruction_size_macro(self):
16011601
frame->instr_ptr = next_instr;
16021602
next_instr += 1;
16031603
INSTRUCTION_STATS(OP);
1604-
frame->return_offset = 1 ;
1604+
frame->return_offset = 1u ;
16051605
DISPATCH();
16061606
}
16071607
"""

Modules/_sre/sre.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2355,7 +2355,7 @@ match_getindex(MatchObject* self, PyObject* index)
23552355
}
23562356

23572357
// Check that i*2 cannot overflow to make static analyzers happy
2358-
assert(i <= SRE_MAXGROUPS);
2358+
assert((size_t)i <= SRE_MAXGROUPS);
23592359
return i;
23602360
}
23612361

Python/executor_cases.c.h

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/generated_cases.c.h

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tools/cases_generator/generators_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ def instruction_size(self,
443443
"""Replace the INSTRUCTION_SIZE macro with the size of the current instruction."""
444444
if uop.instruction_size is None:
445445
raise analysis_error("The INSTRUCTION_SIZE macro requires uop.instruction_size to be set", tkn)
446-
self.out.emit(f" {uop.instruction_size} ")
446+
self.out.emit(f" {uop.instruction_size}u ")
447447
return True
448448

449449
def _print_storage(self, reason:str, storage: Storage) -> None:

0 commit comments

Comments
 (0)