1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

libdtterm: Resolve uninitialized warnings

This commit is contained in:
Peter Howkins 2021-12-21 01:11:29 +00:00 committed by Jon Trulson
parent 108c2fab2c
commit fa4fe1fb47
6 changed files with 13 additions and 8 deletions

View file

@ -984,8 +984,8 @@ _DtTermBufferErase
DtEraseMode eraseSwitch DtEraseMode eraseSwitch
) )
{ {
short startCol; short startCol = 0;
short lastCol; short lastCol = 0;
switch(eraseSwitch) switch(eraseSwitch)
{ {

View file

@ -529,6 +529,8 @@ _DtTermEraseDisplay(Widget w) /* ED CSIpJ */
case 2: case 2:
eraseMode = eraseBuffer; eraseMode = eraseBuffer;
break ; break ;
default:
return;
} }
_DtTermFuncEraseInDisplay(w, (int)eraseMode, fromParser); _DtTermFuncEraseInDisplay(w, (int)eraseMode, fromParser);
vtw->term.tpd->cursorRow = row; vtw->term.tpd->cursorRow = row;
@ -746,6 +748,9 @@ _DtTermEraseInLine(Widget w) /* EL ESC[pK */
eraseMode = eraseLine; eraseMode = eraseLine;
break; break;
default:
return;
} }
_DtTermFuncEraseInLine(w, (int)eraseMode, fromParser); _DtTermFuncEraseInLine(w, (int)eraseMode, fromParser);
} }

View file

@ -573,8 +573,8 @@ _DtTermPrimBufferInsertWc
short *returnLength /* count of characters in overflow buffer */ short *returnLength /* count of characters in overflow buffer */
) )
{ {
short widthInc; /* incremental change in line width */ short widthInc = 0; /* incremental change in line width */
short lengthInc; /* incremental change in line length */ short lengthInc = 0; /* incremental change in line length */
short widthInsert; /* column width of chars inserted */ short widthInsert; /* column width of chars inserted */
short localCol; short localCol;
TermLine line; TermLine line;

View file

@ -68,8 +68,8 @@ _DtTermPrimRefreshTextWc(Widget w, short startColumn, short startRow,
short chunkStartColumn; short chunkStartColumn;
short chunkWidth; short chunkWidth;
short chunkLength; short chunkLength;
short thisStartColumn; short thisStartColumn = 0;
short thisEndColumn; short thisEndColumn = 0;
enhValues enhancements; enhValues enhancements;
int i1; int i1;
int lineNum; int lineNum;

View file

@ -282,7 +282,7 @@ _DtTermPrimSubprocExec(Widget w,
DtTermPrimitiveWidget tw = (DtTermPrimitiveWidget) w; DtTermPrimitiveWidget tw = (DtTermPrimitiveWidget) w;
static char *defaultCmd = (char *) 0; static char *defaultCmd = (char *) 0;
int i; int i;
int pty; int pty = -1;
pid_t pid; pid_t pid;
char *c; char *c;
int err; int err;

View file

@ -599,7 +599,7 @@ CreateMenu(Widget termView, Widget parent, Boolean menuBar,
Arg arglist[20]; Arg arglist[20];
Arg *newArglist; Arg *newArglist;
int i; int i;
KeySym ks; KeySym ks = NoSymbol;
char *accelerator; char *accelerator;
char *acceleratorText; char *acceleratorText;