diff --git a/tools/Forge/Bundles/MapEdit/Dict.h b/tools/Forge/Bundles/MapEdit/Dict.h index 9aafd02cd..e48bf86fc 100644 --- a/tools/Forge/Bundles/MapEdit/Dict.h +++ b/tools/Forge/Bundles/MapEdit/Dict.h @@ -23,7 +23,7 @@ typedef struct { -addString:(const char *)string toValue:(const char *) key; -(char *) convertListToString:(id) list; --(const char *) getStringFor:(const char *) name; +- (const char *) getStringFor:(const char *) name; -removeKeyword:(const char *) key; -(unsigned int) getValueFor:(const char *) name; -changeStringFor:(const char *)key to:(const char *) value; diff --git a/tools/Forge/Bundles/MapEdit/Dict.m b/tools/Forge/Bundles/MapEdit/Dict.m index 61dea21a2..1e48439f2 100644 --- a/tools/Forge/Bundles/MapEdit/Dict.m +++ b/tools/Forge/Bundles/MapEdit/Dict.m @@ -14,7 +14,7 @@ -print { - int i; + NSUInteger i; dict_t *d; for (i = 0; i < numElements; i++) { @@ -34,7 +34,7 @@ JDC -copy { id new; - int i; + NSUInteger i; dict_t *d; char *old; @@ -166,7 +166,7 @@ JDC if (d != NULL) return d->value; - return ""; + return (char *) ""; } // diff --git a/tools/Forge/Bundles/MapEdit/DictList.m b/tools/Forge/Bundles/MapEdit/DictList.m index c8eba578c..00bc2b7a4 100644 --- a/tools/Forge/Bundles/MapEdit/DictList.m +++ b/tools/Forge/Bundles/MapEdit/DictList.m @@ -31,7 +31,7 @@ -writeListFile:(const char *) filename { FILE *fp; - int i; + NSUInteger i; id obj; fp = fopen (filename, "w+t"); @@ -54,7 +54,7 @@ // -(id) findDictKeyword:(const char *) key { - int i; + NSUInteger i; dict_t *d; id dict; diff --git a/tools/Forge/Bundles/MapEdit/Entity.m b/tools/Forge/Bundles/MapEdit/Entity.m index bbdd57043..4c1badb99 100644 --- a/tools/Forge/Bundles/MapEdit/Entity.m +++ b/tools/Forge/Bundles/MapEdit/Entity.m @@ -368,7 +368,8 @@ int nument; f region:(BOOL) reg; { epair_t *e; - int i, ang; + int ang; + unsigned int i; id new; vec3_t mins, maxs; int org[3]; diff --git a/tools/Forge/Bundles/MapEdit/EntityClass.m b/tools/Forge/Bundles/MapEdit/EntityClass.m index 1da499acb..912b4f4c5 100644 --- a/tools/Forge/Bundles/MapEdit/EntityClass.m +++ b/tools/Forge/Bundles/MapEdit/EntityClass.m @@ -157,8 +157,8 @@ insertEC: */ - (void) insertEC:ec { - const char *name; - int i; + const char *name; + unsigned int i; name =[ec classname]; for (i = 0; i <[self count]; i++) { @@ -262,7 +262,7 @@ id entity_classes_i; -(id) classForName:(const char *) name { - int i; + unsigned int i; id o; for (i = 0; i <[self count]; i++) { diff --git a/tools/Forge/Bundles/MapEdit/GNUmakefile.preamble b/tools/Forge/Bundles/MapEdit/GNUmakefile.preamble index bc060b6b5..e27d1e102 100644 --- a/tools/Forge/Bundles/MapEdit/GNUmakefile.preamble +++ b/tools/Forge/Bundles/MapEdit/GNUmakefile.preamble @@ -2,10 +2,10 @@ ADDITIONAL_CPPFLAGS += # Additional flags to pass to the Objective-C compiler -ADDITIONAL_OBJCFLAGS += -DUSING_NIBS -Wall -Werror +ADDITIONAL_OBJCFLAGS += -DUSING_NIBS -Wall -Werror -Wsign-compare -Wwrite-strings #-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations # Additional flags to pass to the C compiler -ADDITIONAL_CFLAGS += -Wall -Werror +ADDITIONAL_CFLAGS += -Wall -Werror -Wsign-compare -Wwrite-strings #-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations # Additional include directories the compiler should search ADDITIONAL_INCLUDE_DIRS += -I ../.. -I ../../../../include diff --git a/tools/Forge/Bundles/MapEdit/Map.m b/tools/Forge/Bundles/MapEdit/Map.m index ae945c2c3..2e731ad7d 100644 --- a/tools/Forge/Bundles/MapEdit/Map.m +++ b/tools/Forge/Bundles/MapEdit/Map.m @@ -301,7 +301,7 @@ writeMapFile fname useRegion:(BOOL) reg { FILE *f; - int i; + unsigned int i; Sys_Printf ("writeMapFile: %s\n", fname); diff --git a/tools/Forge/Bundles/MapEdit/Project.m b/tools/Forge/Bundles/MapEdit/Project.m index be56ae906..e9a35b6ca 100644 --- a/tools/Forge/Bundles/MapEdit/Project.m +++ b/tools/Forge/Bundles/MapEdit/Project.m @@ -521,7 +521,7 @@ Sys_Printf ("openProjectFile: %s\n", path); void changeString (char cf, char ct, char *string) { - int j; + unsigned int j; for (j = 0; j < strlen (string); j++) if (string[j] == cf) diff --git a/tools/Forge/Bundles/MapEdit/QuakeEd.m b/tools/Forge/Bundles/MapEdit/QuakeEd.m index b0bf90ce9..cfc9a70f3 100644 --- a/tools/Forge/Bundles/MapEdit/QuakeEd.m +++ b/tools/Forge/Bundles/MapEdit/QuakeEd.m @@ -136,7 +136,7 @@ Every five minutes, save a modified map if (autodirty) { autodirty = NO; #define FN_AUTOSAVE "/qcache/AutoSaveMap.map" - [map_i writeMapFile: FN_AUTOSAVE useRegion:NO]; + [map_i writeMapFile: (char *) FN_AUTOSAVE useRegion:NO]; } [map_i writeStats]; } @@ -363,9 +363,9 @@ App delegate methods [self disableFlushWindow]; - if ([map_i count] != [entitycount_i intValue]) + if ([map_i count] != (unsigned) [entitycount_i intValue]) [entitycount_i setIntValue:[map_i count]]; - if ([[map_i currentEntity] count] != [brushcount_i intValue]) + if ([[map_i currentEntity] count] != (unsigned) [brushcount_i intValue]) [brushcount_i setIntValue:[[map_i currentEntity] count]]; if (updatecamera) @@ -716,7 +716,7 @@ saveBSP strcat (expandedcmd, "\n"); printf ("system: %s", expandedcmd); - [project_i addToOutput:"\n\n========= BUSY =========\n\n"]; + [project_i addToOutput: (char *) "\n\n========= BUSY =========\n\n"]; [project_i addToOutput:expandedcmd]; if ([preferences_i getShowBSP]) @@ -784,7 +784,7 @@ saveBSP kill (bsppid, 9); // CheckCmdDone (cmdte, 0, NULL); - [project_i addToOutput:"\n\n========= STOPPED =========\n\n"]; + [project_i addToOutput: (char *) "\n\n========= STOPPED =========\n\n"]; return self; } diff --git a/tools/Forge/Bundles/MapEdit/Storage.m b/tools/Forge/Bundles/MapEdit/Storage.m index 25693ea1e..4e19fa65d 100644 --- a/tools/Forge/Bundles/MapEdit/Storage.m +++ b/tools/Forge/Bundles/MapEdit/Storage.m @@ -175,7 +175,7 @@ _shrinkIfDesired (Storage * self) -insertElement:(void *) anElement at:(NSUInteger) index { - int i; + NSUInteger i; CHECK_INDEX (index); _makeRoomForAnotherIfNecessary (self); @@ -193,7 +193,7 @@ anElement at:(NSUInteger) index -removeElementAt:(NSUInteger) index { - int i; + NSUInteger i; CHECK_INDEX (index); numElements--; @@ -239,7 +239,7 @@ index with:(void *) newElement -write:(TypedStream *) aStream { - int i; + NSUInteger i; [super write:aStream]; objc_write_types (aStream, "III*", @@ -251,7 +251,7 @@ index with:(void *) newElement -read:(TypedStream *) aStream { - int i; + NSUInteger i; [super read:aStream]; objc_read_types (aStream, "III*",