From 0bd9fc8ef111ee9d33b8e11273b25a9ebc0dbbb2 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Mon, 1 Aug 2005 10:21:20 +0000 Subject: [PATCH] fixed some warnings when compiling with -O3 svn path=/trunk/; revision=16940 --- reactos/tools/nci/ncitool.c | 11 +++++++++-- reactos/tools/rsym.c | 4 ++-- reactos/tools/widl/client.c | 6 +++--- reactos/tools/widl/server.c | 2 +- reactos/tools/winebuild/import.c | 2 ++ reactos/tools/winebuild/main.c | 1 + reactos/tools/winebuild/parser.c | 1 + reactos/tools/winebuild/relay.c | 1 + reactos/tools/winebuild/res16.c | 1 + reactos/tools/winebuild/res32.c | 1 + reactos/tools/winebuild/spec16.c | 1 + reactos/tools/winebuild/spec32.c | 1 + reactos/tools/winebuild/utils.c | 1 + reactos/tools/wpp/wpp.c | 1 + 14 files changed, 26 insertions(+), 8 deletions(-) diff --git a/reactos/tools/nci/ncitool.c b/reactos/tools/nci/ncitool.c index b7f8cd587e4..af9cf5ceb0c 100644 --- a/reactos/tools/nci/ncitool.c +++ b/reactos/tools/nci/ncitool.c @@ -288,6 +288,7 @@ GetNameAndArgumentsFromDb(char Line[], /* Skip this entry */ *NtSyscallName = NULL; + *SyscallArguments = NULL; } } @@ -336,7 +337,10 @@ CreateStubs(FILE * SyscallDb, /* Extract the Name and Arguments */ GetNameAndArgumentsFromDb(Line, &NtSyscallName, &SyscallArguments); - StackBytes = ARGS_TO_BYTES(strtoul(SyscallArguments, NULL, 0)); + if (SyscallArguments != NULL) + StackBytes = ARGS_TO_BYTES(strtoul(SyscallArguments, NULL, 0)); + else + StackBytes = 0; /* Make sure we really extracted something */ if (NtSyscallName) { @@ -458,7 +462,10 @@ CreateSystemServiceTable(FILE *SyscallDb, if (SyscallId > 0) fprintf(SyscallTable,",\n"); /* Write the syscall arguments in the argument table. */ - fprintf(SyscallTable,"\t\t%lu * sizeof(void *)",strtoul(SyscallArguments, NULL, 0)); + if (SyscallArguments != NULL) + fprintf(SyscallTable,"\t\t%lu * sizeof(void *)",strtoul(SyscallArguments, NULL, 0)); + else + fprintf(SyscallTable,"\t\t0"); /* Only increase if we actually added something */ SyscallId++; diff --git a/reactos/tools/rsym.c b/reactos/tools/rsym.c index a69ef711dbb..2efdb010eba 100644 --- a/reactos/tools/rsym.c +++ b/reactos/tools/rsym.c @@ -759,9 +759,9 @@ int main(int argc, char* argv[]) ULONG StabsLength; void *StabStringBase; ULONG StabStringsLength; - void *CoffBase; + void *CoffBase = NULL; ULONG CoffsLength; - void *CoffStringBase; + void *CoffStringBase = NULL; ULONG CoffStringsLength; char* path1; char* path2; diff --git a/reactos/tools/widl/client.c b/reactos/tools/widl/client.c index ec95a63f5ed..a30a6c07dbf 100644 --- a/reactos/tools/widl/client.c +++ b/reactos/tools/widl/client.c @@ -627,8 +627,8 @@ static void write_typeformatstring(type_t *iface) static void print_message_buffer_size(func_t *func, unsigned int *type_offset) { unsigned int local_type_offset = *type_offset; - unsigned int alignment; - int size; + unsigned int alignment = 0; + int size = 0; int last_size = -1; int in_attr; int out_attr; @@ -1381,7 +1381,7 @@ static void unmarshall_out_arguments(func_t *func, unsigned int *type_offset) default: error("%s:%d Unknown/unsupported type 0x%x\n", - __FUNCTION__,__LINE__, var->type->type); + __FUNCTION__,__LINE__, def->type->type); return; } diff --git a/reactos/tools/widl/server.c b/reactos/tools/widl/server.c index 4fed72ceb65..d2f15494c8f 100644 --- a/reactos/tools/widl/server.c +++ b/reactos/tools/widl/server.c @@ -1385,7 +1385,7 @@ static void marshall_out_arguments(func_t *func, unsigned int *type_offset) default: error("%s:%d Unknown/unsupported type 0x%x\n", - __FUNCTION__,__LINE__, var->type->type); + __FUNCTION__,__LINE__, def->type->type); return; } diff --git a/reactos/tools/winebuild/import.c b/reactos/tools/winebuild/import.c index f1c2520a499..ad35d302d74 100644 --- a/reactos/tools/winebuild/import.c +++ b/reactos/tools/winebuild/import.c @@ -20,12 +20,14 @@ */ #include "config.h" +#include "wine/port.h" #include #include #include #include #include +#include #ifdef HAVE_SYS_STAT_H # include #endif diff --git a/reactos/tools/winebuild/main.c b/reactos/tools/winebuild/main.c index 6deadbdb83b..48ace973d65 100644 --- a/reactos/tools/winebuild/main.c +++ b/reactos/tools/winebuild/main.c @@ -23,6 +23,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/reactos/tools/winebuild/parser.c b/reactos/tools/winebuild/parser.c index 6043018fd24..b85a3e66976 100644 --- a/reactos/tools/winebuild/parser.c +++ b/reactos/tools/winebuild/parser.c @@ -23,6 +23,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/reactos/tools/winebuild/relay.c b/reactos/tools/winebuild/relay.c index 3eec149a3ba..a15fe92b457 100644 --- a/reactos/tools/winebuild/relay.c +++ b/reactos/tools/winebuild/relay.c @@ -23,6 +23,7 @@ */ #include "config.h" +#include "wine/port.h" #include diff --git a/reactos/tools/winebuild/res16.c b/reactos/tools/winebuild/res16.c index 87a16029687..3b814313932 100644 --- a/reactos/tools/winebuild/res16.c +++ b/reactos/tools/winebuild/res16.c @@ -19,6 +19,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/reactos/tools/winebuild/res32.c b/reactos/tools/winebuild/res32.c index 2a8dbc39876..d7589de85a3 100644 --- a/reactos/tools/winebuild/res32.c +++ b/reactos/tools/winebuild/res32.c @@ -19,6 +19,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/reactos/tools/winebuild/spec16.c b/reactos/tools/winebuild/spec16.c index e22251ac0e5..28699b05fc7 100644 --- a/reactos/tools/winebuild/spec16.c +++ b/reactos/tools/winebuild/spec16.c @@ -23,6 +23,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/reactos/tools/winebuild/spec32.c b/reactos/tools/winebuild/spec32.c index 0f111026c6c..5624ce4a6fd 100644 --- a/reactos/tools/winebuild/spec32.c +++ b/reactos/tools/winebuild/spec32.c @@ -23,6 +23,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include diff --git a/reactos/tools/winebuild/utils.c b/reactos/tools/winebuild/utils.c index 0e64d801c37..2336206b836 100644 --- a/reactos/tools/winebuild/utils.c +++ b/reactos/tools/winebuild/utils.c @@ -19,6 +19,7 @@ */ #include "config.h" +#include "wine/port.h" #if !defined(WIN32) #undef strdup diff --git a/reactos/tools/wpp/wpp.c b/reactos/tools/wpp/wpp.c index 00ab5195775..ec70e873f89 100644 --- a/reactos/tools/wpp/wpp.c +++ b/reactos/tools/wpp/wpp.c @@ -20,6 +20,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include