Skip to content
This repository was archived by the owner on Jun 16, 2025. It is now read-only.

Commit 47650fe

Browse files
committed
Lint: uninitialized variable
From oclint: src/lib/libast/tm/tmxscan.c:353:26: 3rd function call argument is an uninitialized value
1 parent 65bfa30 commit 47650fe

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/lib/libast/tm/tmxscan.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ static_fn Time_t tmx_scan(const char *s, char **e, const char *format, char **f,
154154
char *p;
155155
Tm_t *tm;
156156
const char *b;
157-
char *u;
158157
char *stack[4];
159158
int m;
160159
int hi;
@@ -164,7 +163,7 @@ static_fn Time_t tmx_scan(const char *s, char **e, const char *format, char **f,
164163
Set_t set;
165164
Tm_zone_t *zp;
166165
Tm_t ts;
167-
166+
char *u = NULL;
168167
char **sp = &stack[0];
169168

170169
while (isspace(*s)) s++;
@@ -222,7 +221,7 @@ static_fn Time_t tmx_scan(const char *s, char **e, const char *format, char **f,
222221
continue;
223222
case 'd':
224223
if (pedantic && !isdigit(*s)) goto next;
225-
/*FALLTHROUGH*/
224+
// FALLTHRU
226225
case 'e':
227226
NUMBER(2, 1, 31);
228227
set.mday = n;
@@ -267,7 +266,7 @@ static_fn Time_t tmx_scan(const char *s, char **e, const char *format, char **f,
267266
while (*s == '\n') s++;
268267
continue;
269268
}
270-
/*FALLTHROUGH*/
269+
// FALLTHRU
271270
case 't':
272271
while (isspace(*s)) s++;
273272
continue;
@@ -345,7 +344,7 @@ static_fn Time_t tmx_scan(const char *s, char **e, const char *format, char **f,
345344
s = u;
346345
u = zp->type;
347346
} else {
348-
u = 0;
347+
u = NULL;
349348
}
350349
if (d == 'q') continue;
351350
// FALLTHRU

0 commit comments

Comments
 (0)