mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fix various possible uses of uninitialised variables
Patch from OpenSUSE, slightly adapted for 93u+m. Source: https://build.opensuse.org/package/view_file/shells/ksh/ksh93-uninitialized.dif
This commit is contained in:
parent
c52cb93999
commit
288b6c6517
15 changed files with 39 additions and 32 deletions
|
|
@ -211,8 +211,8 @@ S2F_function(str, end) char* str; char** end;
|
|||
int decimal = 0;
|
||||
int thousand = 0;
|
||||
int part = 0;
|
||||
int back_part;
|
||||
S2F_batch back_n;
|
||||
int back_part = 0;
|
||||
S2F_batch back_n = 0;
|
||||
S2F_number v;
|
||||
S2F_number p;
|
||||
S2F_part_t parts[16];
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ int type; /* >0: scanf, =0: printf, -1: internal */
|
|||
#endif
|
||||
{
|
||||
int base, fmt, flags, dot, width, precis;
|
||||
ssize_t n_str, size;
|
||||
ssize_t n_str, size = 0;
|
||||
char *t_str, *sp;
|
||||
int v, n, skip, dollar, decimal, thousand;
|
||||
Sffmt_t savft;
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ char* form; /* format to use */
|
|||
va_list args; /* arg list if !argf */
|
||||
#endif
|
||||
{
|
||||
int n, v, w, k, n_s, base, fmt, flags;
|
||||
int n, v=0, w, k, n_s, base, fmt, flags;
|
||||
Sflong_t lv;
|
||||
char *sp, *ssp, *endsp, *ep, *endep;
|
||||
int dot, width, precis, sign, decpt;
|
||||
|
|
@ -129,7 +129,7 @@ va_list args; /* arg list if !argf */
|
|||
int decimal = 0, thousand = 0;
|
||||
|
||||
#if _has_multibyte
|
||||
wchar_t* wsp;
|
||||
wchar_t* wsp = 0;
|
||||
SFMBDCL(fmbs) /* state of format string */
|
||||
SFMBDCL(mbs) /* state of some string */
|
||||
#ifdef mbwidth
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue