libstdio: fix uninitialized variables
This commit is contained in:
parent
3b4af1e4d8
commit
aedc31e925
@ -467,6 +467,8 @@ ocvt_flt(FILE *f, va_list *args, int flags, int width, int precision,
|
||||
char *eptr;
|
||||
double d;
|
||||
|
||||
digits = nil;
|
||||
eptr = nil;
|
||||
echr = 'e';
|
||||
fmt = afmt;
|
||||
d = va_arg(*args, double);
|
||||
|
@ -300,7 +300,7 @@ Done:
|
||||
static int icvt_s(FILE *f, va_list *args, int store, int width, int type){
|
||||
#pragma ref type
|
||||
int c, nn;
|
||||
register char *s;
|
||||
register char *s = nil;
|
||||
if(store) s=va_arg(*args, char *);
|
||||
do
|
||||
c=ngetc(f);
|
||||
@ -328,7 +328,7 @@ Done:
|
||||
static int icvt_c(FILE *f, va_list *args, int store, int width, int type){
|
||||
#pragma ref type
|
||||
int c;
|
||||
register char *s;
|
||||
register char *s = nil;
|
||||
if(store) s=va_arg(*args, char *);
|
||||
if(width<0) width=1;
|
||||
for(;;){
|
||||
@ -360,7 +360,7 @@ static int match(int c, const char *pat){
|
||||
static int icvt_sq(FILE *f, va_list *args, int store, int width, int type){
|
||||
#pragma ref type
|
||||
int c, nn;
|
||||
register char *s;
|
||||
register char *s = nil;
|
||||
register const char *pat;
|
||||
pat=++fmtp;
|
||||
if(*fmtp=='^') fmtp++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user