[amiwm] Do another pass to clean up build warnings

This is mostly a "dangling if" cleanup, but I did add some other
comments here and there!
This commit is contained in:
Adrian Chadd
2022-02-10 11:11:05 -08:00
parent 59eae9c029
commit 5365f97cbe
20 changed files with 2077 additions and 4411 deletions

View File

@@ -8,7 +8,7 @@ RANLIB = @RANLIB@
CFLAGS = @CFLAGS@
YFLAGS = -d
DEFS = @DEFS@
ALL_CFLAGS = -I@srcdir@ -I@top_srcdir@ $(DEFS) $(CFLAGS) @X_CFLAGS@
ALL_CFLAGS = -Wall -I@srcdir@ -I@top_srcdir@ $(DEFS) $(CFLAGS) @X_CFLAGS@
LIBS = @X_LIBS@ @X_PRE_LIBS@ -lXext -lXmu -lX11 @X_EXTRA_LIBS@ @LIBS@
prefix = @prefix@
exec_prefix = @exec_prefix@

View File

@@ -40,7 +40,7 @@ BOOL Fault(LONG code, UBYTE *header, UBYTE *buffer, LONG len)
strcpy((char *)buffer, syserrmsg[code-MIN_ERRNO]);
} else {
char number[6+4*sizeof(LONG)];
sprintf(number, "Error %ld", code);
sprintf(number, "Error %ld", (long int) code);
if(len<strlen(number)+1)
return FALSE;
strcpy((char *)buffer, number);

View File

@@ -505,12 +505,13 @@ struct DiskObject *GetDefDiskObject(LONG def_type)
if(def_type<WBDISK || def_type>WBAPPICON)
return NULL;
if(!icondir)
if(!(icondir = get_current_icondir()))
if(!icondir) {
if(!(icondir = get_current_icondir())) {
return NULL;
else
} else {
l = strlen(icondir);
}
}
#ifdef HAVE_ALLOCA
buf = alloca(l+18);
#else

View File

@@ -2,6 +2,8 @@
#ifndef AMIGAOS
#include <string.h>
void NewList(struct List *list)
{
list->lh_TailPred = (struct Node *)&list->lh_Head;