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