From: Peter Howkins Date: Mon, 17 Sep 2012 13:56:06 +0000 (+0100) Subject: dtstyle: Resolve 28 compiler warnings. X-Git-Tag: 2.2.0c~58^2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=dcdd21df3431e532728b9dbda6d2519921336f8e;p=oweals%2Fcde.git dtstyle: Resolve 28 compiler warnings. --- diff --git a/cde/programs/dtstyle/Audio.c b/cde/programs/dtstyle/Audio.c index 871aff7f..427449d2 100644 --- a/cde/programs/dtstyle/Audio.c +++ b/cde/programs/dtstyle/Audio.c @@ -650,7 +650,7 @@ restoreAudio( XrmValue value; xrm_name [0] = XrmStringToQuark ("audioDlg"); - xrm_name [2] = NULL; + xrm_name [2] = 0; /* get x position */ xrm_name [1] = XrmStringToQuark ("x"); diff --git a/cde/programs/dtstyle/Backdrop.c b/cde/programs/dtstyle/Backdrop.c index f1c2e16f..33c48e1d 100644 --- a/cde/programs/dtstyle/Backdrop.c +++ b/cde/programs/dtstyle/Backdrop.c @@ -552,7 +552,7 @@ static ReadBitmaps( void ) { int status; - Pixmap tmpPix = NULL; + Pixmap tmpPix = 0; int width, height, x, y; Window win; int num; @@ -589,7 +589,7 @@ static { /* give error dialog, free space, and return */ backdrops.errStr = (char *)XtMalloc(strlen(ERR2) + 1); - sprintf(backdrops.errStr, ERR2); + sprintf(backdrops.errStr, "%s", ERR2); ErrDialog (backdrops.errStr, style.shell); FreeAll(); free_dirList(backdrops.dirList, backdrops.dirCount); @@ -608,7 +608,7 @@ static { /* give error dialog, free space, and return */ backdrops.errStr = (char *)XtMalloc(strlen(ERR2) + 1); - sprintf(backdrops.errStr, ERR2); + sprintf(backdrops.errStr, "%s", ERR2); ErrDialog (backdrops.errStr, style.shell); FreeAll(); free_dirList(backdrops.dirList, backdrops.dirCount); @@ -1129,7 +1129,7 @@ restoreBackdrop( XrmValue value; xrm_name [0] = XrmStringToQuark (BACKDROPSDLG); - xrm_name [2] = NULL; + xrm_name [2] = 0; /* get x position */ xrm_name [1] = XrmStringToQuark ("x"); diff --git a/cde/programs/dtstyle/ColorEdit.c b/cde/programs/dtstyle/ColorEdit.c index c992658f..9e067633 100644 --- a/cde/programs/dtstyle/ColorEdit.c +++ b/cde/programs/dtstyle/ColorEdit.c @@ -1615,7 +1615,7 @@ restoreColorEdit( XrmValue value; xrm_name [0] = XrmStringToQuark ("colorEditDlg"); - xrm_name [2] = NULL; + xrm_name [2] = 0; /* get x position */ xrm_name [1] = XrmStringToQuark ("x"); diff --git a/cde/programs/dtstyle/ColorMain.c b/cde/programs/dtstyle/ColorMain.c index 8d97d3c9..40d04c47 100644 --- a/cde/programs/dtstyle/ColorMain.c +++ b/cde/programs/dtstyle/ColorMain.c @@ -2323,7 +2323,7 @@ restoreColor( /*"paletteDlg" is the resource name of the dialog shell we are saving for.*/ xrm_name [0] = XrmStringToQuark (PALETTEDLG); - xrm_name [2] = NULL; + xrm_name [2] = 0; /* get x position */ xrm_name [1] = XrmStringToQuark ("x"); @@ -2343,7 +2343,7 @@ restoreColor( strcpy(defaultName_restore, value.addr); } else - defaultName_restore[0] = NULL; + defaultName_restore[0] = 0; /* get selected button */ xrm_name [1] = XrmStringToQuark ("selected_button"); diff --git a/cde/programs/dtstyle/Dtwm.c b/cde/programs/dtstyle/Dtwm.c index 578b3e9a..08d79c6b 100644 --- a/cde/programs/dtstyle/Dtwm.c +++ b/cde/programs/dtstyle/Dtwm.c @@ -911,7 +911,7 @@ restoreDtwm( XrmValue value; xrm_name [0] = XrmStringToQuark ("dtwmDlg"); - xrm_name [2] = NULL; + xrm_name [2] = 0; /* get x position */ xrm_name [1] = XrmStringToQuark ("x"); diff --git a/cde/programs/dtstyle/Font.c b/cde/programs/dtstyle/Font.c index d573a12e..777d41be 100644 --- a/cde/programs/dtstyle/Font.c +++ b/cde/programs/dtstyle/Font.c @@ -685,7 +685,7 @@ restoreFonts( XrmValue value; xrm_name [0] = XrmStringToQuark ("Fonts"); - xrm_name [2] = NULL; + xrm_name [2] = 0; /* get x position */ xrm_name [1] = XrmStringToQuark ("x"); diff --git a/cde/programs/dtstyle/I18nMain.c b/cde/programs/dtstyle/I18nMain.c index 4f508c57..cea3c9f6 100644 --- a/cde/programs/dtstyle/I18nMain.c +++ b/cde/programs/dtstyle/I18nMain.c @@ -1131,7 +1131,7 @@ restoreI18n( XrmValue value; xrm_name [0] = XrmStringToQuark ("i18nDlg"); - xrm_name [2] = NULL; + xrm_name [2] = 0; /* get x position */ xrm_name [1] = XrmStringToQuark ("x"); diff --git a/cde/programs/dtstyle/Keyboard.c b/cde/programs/dtstyle/Keyboard.c index 58421cf6..0898220d 100644 --- a/cde/programs/dtstyle/Keyboard.c +++ b/cde/programs/dtstyle/Keyboard.c @@ -569,7 +569,7 @@ restoreKeybd( XrmValue value; xrm_name [0] = XrmStringToQuark ("keyboardDlg"); - xrm_name [2] = NULL; + xrm_name [2] = 0; /* get x position */ xrm_name [1] = XrmStringToQuark ("x"); diff --git a/cde/programs/dtstyle/MainWin.c b/cde/programs/dtstyle/MainWin.c index 33770264..c48761d7 100644 --- a/cde/programs/dtstyle/MainWin.c +++ b/cde/programs/dtstyle/MainWin.c @@ -198,7 +198,7 @@ build_mainWindow( n = 0; tmpStr = (char *)XtMalloc(strlen(GETMESSAGE(4, 1, "Style Manager"))+1); - sprintf(tmpStr, GETMESSAGE(4, 1, "Style Manager")); + sprintf(tmpStr, "%s", GETMESSAGE(4, 1, "Style Manager")); XtSetArg(args[n], XmNtitle, tmpStr); n++; XtSetArg(args[n], XmNiconName, (char *)GETMESSAGE(4, 37, "Style")); n++; @@ -474,68 +474,68 @@ ProcessComponentList( { cmp_string = CMPSTR(GETMESSAGE(4, 27, "Color")); helpTag = HELP_COLOR_BUTTON; - dtIcon = _DtGetIconFileName(style.screen, COLOR_ICON, NULL, NULL, NULL); + dtIcon = _DtGetIconFileName(style.screen, COLOR_ICON, NULL, NULL, 0); style.workProcs = True; } else if (strcmp(string, FONT) == 0) { cmp_string = CMPSTR(GETMESSAGE(4, 28, "Font")); - dtIcon = _DtGetIconFileName(style.screen, FONT_ICON, NULL, NULL, NULL); + dtIcon = _DtGetIconFileName(style.screen, FONT_ICON, NULL, NULL, 0); helpTag = HELP_FONT_BUTTON; } else if (strcmp(string, BACKDROP) == 0) { cmp_string = CMPSTR(GETMESSAGE(4, 29, "Backdrop")); - dtIcon = _DtGetIconFileName(style.screen, BACKDROP_ICON, NULL, NULL, NULL); + dtIcon = _DtGetIconFileName(style.screen, BACKDROP_ICON, NULL, NULL, 0); helpTag = HELP_BACKDROP_BUTTON; } else if (strcmp(string, KEYBOARD) == 0) { cmp_string = CMPSTR(GETMESSAGE(4, 30, "Keyboard")); - dtIcon = _DtGetIconFileName(style.screen, KEYBOARD_ICON, NULL, NULL, NULL); + dtIcon = _DtGetIconFileName(style.screen, KEYBOARD_ICON, NULL, NULL, 0); helpTag = HELP_KEYBOARD_BUTTON; } else if (strcmp(string, MOUSE) == 0) { cmp_string = CMPSTR(GETMESSAGE(4, 31, "Mouse")); - dtIcon = _DtGetIconFileName(style.screen, MOUSE_ICON, NULL, NULL, NULL); + dtIcon = _DtGetIconFileName(style.screen, MOUSE_ICON, NULL, NULL, 0); helpTag = HELP_MOUSE_BUTTON; } else if (strcmp(string, BEEP) == 0) { cmp_string = CMPSTR(GETMESSAGE(4, 32, "Beep")); - dtIcon = _DtGetIconFileName(style.screen, BEEP_ICON, NULL, NULL, NULL); + dtIcon = _DtGetIconFileName(style.screen, BEEP_ICON, NULL, NULL, 0); helpTag = HELP_AUDIO_BUTTON; } else if (strcmp(string, SCREEN) == 0) { cmp_string = CMPSTR(GETMESSAGE(4, 33, "Screen")); - dtIcon = _DtGetIconFileName(style.screen, SCREEN_ICON, NULL, NULL, NULL); + dtIcon = _DtGetIconFileName(style.screen, SCREEN_ICON, NULL, NULL, 0); helpTag = HELP_SCREEN_BUTTON; } else if (strcmp(string, DTWM) == 0) { cmp_string = CMPSTR(GETMESSAGE(4, 38, "Window")); - dtIcon = _DtGetIconFileName(style.screen, DTWM_ICON, NULL, NULL, NULL); + dtIcon = _DtGetIconFileName(style.screen, DTWM_ICON, NULL, NULL, 0); helpTag = HELP_DTWM_BUTTON; } else if (strcmp(string, STARTUP) == 0) { cmp_string = CMPSTR(GETMESSAGE(4, 35, "Startup")); - dtIcon = _DtGetIconFileName(style.screen, STARTUP_ICON, NULL, NULL, NULL); + dtIcon = _DtGetIconFileName(style.screen, STARTUP_ICON, NULL, NULL, 0); helpTag = HELP_STARTUP_BUTTON; } else if (strcmp(string, I18N) == 0) { cmp_string = CMPSTR(GETMESSAGE(4, 34, "Intl'")); - dtIcon = _DtGetIconFileName(style.screen, I18N_ICON, NULL, NULL, NULL); + dtIcon = _DtGetIconFileName(style.screen, I18N_ICON, NULL, NULL, 0); helpTag = HELP_I18N_BUTTON; } else @@ -717,7 +717,7 @@ restoreMain( xrm_name [0] = XrmStringToQuark ("mainWindow"); xrm_name [1] = XrmStringToQuark ("ismapped"); - xrm_name [2] = NULL; + xrm_name [2] = 0; if (XrmQGetResource (db, xrm_name, xrm_name, &rep_type, &value)) { /* Are we supposed to be mapped? */ diff --git a/cde/programs/dtstyle/Mouse.c b/cde/programs/dtstyle/Mouse.c index b963b805..c12181c5 100644 --- a/cde/programs/dtstyle/Mouse.c +++ b/cde/programs/dtstyle/Mouse.c @@ -1706,7 +1706,7 @@ restoreMouse( XrmValue value; xrm_name [0] = XrmStringToQuark ("Mouse"); - xrm_name [2] = NULL; + xrm_name [2] = 0; /* get x position */ xrm_name [1] = XrmStringToQuark ("x"); diff --git a/cde/programs/dtstyle/Screen.c b/cde/programs/dtstyle/Screen.c index 997aa5ec..00a5e00a 100644 --- a/cde/programs/dtstyle/Screen.c +++ b/cde/programs/dtstyle/Screen.c @@ -2843,7 +2843,7 @@ restoreScreen( XrmValue value; xrm_name [0] = XrmStringToQuark ("Screen"); - xrm_name [2] = NULL; + xrm_name [2] = 0; /* get x position */ xrm_name [1] = XrmStringToQuark ("x"); diff --git a/cde/programs/dtstyle/Startup.c b/cde/programs/dtstyle/Startup.c index 6d59c748..8c6dc268 100644 --- a/cde/programs/dtstyle/Startup.c +++ b/cde/programs/dtstyle/Startup.c @@ -139,7 +139,7 @@ popup_startupBB( if (style.startupDialog == NULL) { - if (smWindow != NULL) + if (smWindow != 0) { if (style.smState.smCompatMode) { @@ -660,7 +660,7 @@ restoreStartup( XrmValue value; xrm_name [0] = XrmStringToQuark ("startupDlg"); - xrm_name [2] = NULL; + xrm_name [2] = 0; /* get x position */ xrm_name [1] = XrmStringToQuark ("x");