Skip to content

Commit df9ae02

Browse files
committed
initialise 'mask' in slotspec parser to quiet older gcc warnings
it can't actually be used uninitialised because of the relevant action only executing after end_slot, but it's hard for gcc to prove that
1 parent 85cabf6 commit df9ae02

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

slot-spec.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ slotspec_parse_pe(struct slotspec *spec, const char *p, const char *pe)
172172
enum piv_slotid slotid;
173173
const char *slotp = NULL, *slotpe = NULL;
174174
char *slot;
175-
uint64_t mask;
175+
uint64_t mask = 0;
176176
errf_t *err = ERRF_OK;
177177
unsigned long int parsed;
178178
int cs;

slot-spec.rl

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ slotspec_parse_pe(struct slotspec *spec, const char *p, const char *pe)
140140
enum piv_slotid slotid;
141141
const char *slotp = NULL, *slotpe = NULL;
142142
char *slot;
143-
uint64_t mask;
143+
uint64_t mask = 0;
144144
errf_t *err = ERRF_OK;
145145
unsigned long int parsed;
146146
int cs;

0 commit comments

Comments
 (0)