mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
signed/unsigned and some const-correctness
This commit is contained in:
parent
646422d683
commit
4d63d20663
10 changed files with 24 additions and 23 deletions
|
@ -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;
|
||||
|
|
|
@ -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 *) "";
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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++) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -301,7 +301,7 @@ writeMapFile
|
|||
fname useRegion:(BOOL) reg
|
||||
{
|
||||
FILE *f;
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
Sys_Printf ("writeMapFile: %s\n", fname);
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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*",
|
||||
|
|
Loading…
Reference in a new issue