Skip to content

Commit c0668a3

Browse files
Quipyowert2khwilliamson
authored andcommitted
pp_pack: Suppress Cppcheck warning.
Cppcheck warns about assigning the address of a stack variable to a function parameter. This is harmless because symptr->previous is reassigned after the recursive call to (un)pack_rec by the copying of savsym/lookahead to the struct pointed to by symptr. Fixes #20180.
1 parent 871702b commit c0668a3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pp_pack.c

+2
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,7 @@ S_unpack_rec(pTHX_ tempsym_t* symptr, const char *s, const char *strbeg, const c
939939
const U32 group_modifiers = TYPE_MODIFIERS(datumtype & ~symptr->flags);
940940
symptr->flags |= group_modifiers;
941941
symptr->patend = savsym.grpend;
942+
/* cppcheck-suppress autoVariables */
942943
symptr->previous = &savsym;
943944
symptr->level++;
944945
PUTBACK;
@@ -2249,6 +2250,7 @@ S_pack_rec(pTHX_ SV *cat, tempsym_t* symptr, SV **beglist, SV **endlist )
22492250
symptr->flags |= group_modifiers;
22502251
symptr->patend = savsym.grpend;
22512252
symptr->level++;
2253+
/* cppcheck-suppress autoVariables */
22522254
symptr->previous = &lookahead;
22532255
while (len--) {
22542256
U32 was_utf8;

0 commit comments

Comments
 (0)