mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fix several pointer-bool-conversion warnings that could cause cores
This commit is contained in:
parent
adc056eb83
commit
d470302354
6 changed files with 18 additions and 15 deletions
|
@ -220,7 +220,7 @@ void getAF_Icons(FiletypeData *pFiletypedata)
|
|||
/***************************************************************/
|
||||
pIconData = GetIconDataFromWid(AF_MED_IconGadget);
|
||||
if ( (pIconData->pmDirtyBit) &&
|
||||
(pIconData->pmFileName) &&
|
||||
(pIconData->pmFileName[0]) &&
|
||||
(strlen(pIconData->pmFileName)) ) {
|
||||
pFiletypedata->pszMedPmIcon = XtMalloc(strlen(pIconData->pmFileName) + 1);
|
||||
if (pFiletypedata->pszMedPmIcon) {
|
||||
|
@ -234,7 +234,7 @@ void getAF_Icons(FiletypeData *pFiletypedata)
|
|||
/* Medium Bitmap */
|
||||
/***************************************************************/
|
||||
if ( (pIconData->bmDirtyBit) &&
|
||||
(pIconData->bmFileName) &&
|
||||
(pIconData->bmFileName[0]) &&
|
||||
(strlen(pIconData->bmFileName)) ) {
|
||||
pFiletypedata->pszMedBmIcon = XtMalloc(strlen(pIconData->bmFileName) + 1);
|
||||
if (pFiletypedata->pszMedBmIcon) {
|
||||
|
@ -249,7 +249,7 @@ void getAF_Icons(FiletypeData *pFiletypedata)
|
|||
/***************************************************************/
|
||||
pIconData = GetIconDataFromWid(AF_TINY_IconGadget);
|
||||
if ( (pIconData->pmDirtyBit) &&
|
||||
(pIconData->pmFileName) &&
|
||||
(pIconData->pmFileName[0]) &&
|
||||
(strlen(pIconData->pmFileName)) ) {
|
||||
pFiletypedata->pszTinyPmIcon = XtMalloc(strlen(pIconData->pmFileName) + 1);
|
||||
if (pFiletypedata->pszTinyPmIcon) {
|
||||
|
|
|
@ -700,7 +700,7 @@ void SetIconData(Widget wid, char *pszIconFile, enum icon_size_range enumIconSiz
|
|||
pIconData = GetIconDataFromWid(wid);
|
||||
if (pIconData) {
|
||||
if ( (pIconData->pmDirtyBit) &&
|
||||
(pIconData->pmFileName) &&
|
||||
(pIconData->pmFileName[0]) &&
|
||||
(strlen(pIconData->pmFileName)) ) {
|
||||
#ifdef DEBUG
|
||||
printf("SetIconData: unlink '%s'\n", pIconData->pmFileName); /* debug */
|
||||
|
|
|
@ -634,7 +634,7 @@ void RemoveTmpIconFiles( void )
|
|||
|
||||
for (i=0; i < ICON_NUMBER; i++) {
|
||||
if ( (IconDataList[i]->pmDirtyBit) &&
|
||||
(IconDataList[i]->pmFileName) &&
|
||||
(IconDataList[i]->pmFileName[0]) &&
|
||||
(strlen(IconDataList[i]->pmFileName)) ) {
|
||||
#ifdef DEBUG
|
||||
printf("RemoveTmpIconFiles: unlink '%s'\n", IconDataList[i]->pmFileName); /* debug */
|
||||
|
|
|
@ -221,10 +221,13 @@ Boolean
|
|||
Read_File(
|
||||
char *fnameIn )
|
||||
{
|
||||
char *base_name, *suffix, fname[MAXPATHLEN+1], *tmp, *tmp2;
|
||||
unsigned int mask_width_ret, mask_height_ret;
|
||||
int mask_x_hot, mask_y_hot, first;
|
||||
struct stat statBuf;
|
||||
char *base_name = NULL, *suffix = NULL,
|
||||
fname[MAXPATHLEN], *tmp = NULL, *tmp2 = NULL;
|
||||
unsigned int mask_width_ret = 0, mask_height_ret = 0;
|
||||
int mask_x_hot = 0, mask_y_hot = 0, first = 0;
|
||||
struct stat statBuf = {};
|
||||
|
||||
fname[0] = 0;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (debug)
|
||||
|
@ -259,7 +262,7 @@ Read_File(
|
|||
|
||||
/*** - if we got a NULL base_name, return FALSE ***/
|
||||
base_name = strrchr(fname, '/');
|
||||
if (fname)
|
||||
if (fname[0])
|
||||
base_name = (base_name ? base_name + 1 : fname);
|
||||
if (!base_name)
|
||||
return (False);
|
||||
|
@ -491,7 +494,7 @@ Write_File(
|
|||
|
||||
|
||||
base_name = strrchr(fname, '/');
|
||||
if (fname) {
|
||||
if (fname[0]) {
|
||||
base_name = (base_name ? base_name + 1 : fname);
|
||||
}
|
||||
|
||||
|
@ -735,7 +738,7 @@ Display_XPMFile(
|
|||
reset_debug = True;
|
||||
}
|
||||
#endif
|
||||
PixelTableClear; /* force new pixel table now */
|
||||
PixelTableClear(); /* force new pixel table now */
|
||||
for (i=0; i<width; i++)
|
||||
for (j=0; j<height; j++) {
|
||||
converted = False;
|
||||
|
|
|
@ -2505,7 +2505,7 @@ ChangeTitle(void)
|
|||
sprintf(dialogTitle, "%s - ", name);
|
||||
}
|
||||
|
||||
if (last_fname && *last_fname)
|
||||
if (*last_fname)
|
||||
{
|
||||
if (name = strrchr(last_fname, '/'))
|
||||
name++;
|
||||
|
|
|
@ -626,7 +626,7 @@ callCancels( void )
|
|||
XtCallCallbacks(style.startupDialog, XmNcallback, &CancelBut);
|
||||
}
|
||||
|
||||
if (dialogStates)
|
||||
if (dialogStates[0])
|
||||
_DtAddToResource(style.display, dialogStates);
|
||||
|
||||
calledAlready = True;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue