Commit 39b3a57b authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

widl: Fix symbol was not declared and using plain integer as NULL pointer sparse warnings.

parent c137b95d
......@@ -45,4 +45,6 @@ void pop_import(void);
int is_type(const char *name);
extern char *temp_name;
#endif
......@@ -64,8 +64,6 @@ double [0-9]+\.[0-9]+([eE][+-]?[0-9]+)*
#include "parser.tab.h"
extern char *temp_name;
static void addcchar(char c);
static char *get_buffered_cstring(void);
......
......@@ -69,7 +69,7 @@ static unsigned int write_string_tfs(FILE *file, const attr_list_t *attrs,
type_t *type, int toplevel_param,
const char *name, unsigned int *typestring_offset);
const char *string_of_type(unsigned char type)
static const char *string_of_type(unsigned char type)
{
switch (type)
{
......@@ -133,7 +133,7 @@ static void *get_aliaschain_attrp(const type_t *type, enum attr_type attr)
return get_attrp(t->attrs, attr);
else if (type_is_alias(t))
t = type_alias_get_aliasee(t);
else return 0;
else return NULL;
}
}
......@@ -391,7 +391,7 @@ unsigned char get_struct_fc(const type_t *type)
return RPC_FC_STRUCT;
}
unsigned char get_array_fc(const type_t *type)
static unsigned char get_array_fc(const type_t *type)
{
unsigned char fc;
const expr_t *size_is;
......@@ -641,7 +641,7 @@ static type_t *get_user_type(const type_t *t, const char **pname)
if (type_is_alias(t))
t = type_alias_get_aliasee(t);
else
return 0;
return NULL;
}
}
......
......@@ -100,7 +100,7 @@ int parser_debug, yy_flex_debug;
int pedantic = 0;
int do_everything = 1;
int preprocess_only = 0;
static int preprocess_only = 0;
int do_header = 0;
int do_typelib = 0;
int do_proxies = 0;
......@@ -108,7 +108,7 @@ int do_client = 0;
int do_server = 0;
int do_idfile = 0;
int do_dlldata = 0;
int no_preprocess = 0;
static int no_preprocess = 0;
int old_names = 0;
int do_win32 = 1;
int do_win64 = 1;
......@@ -127,16 +127,15 @@ char *client_name;
char *client_token;
char *server_name;
char *server_token;
char *idfile_name;
char *idfile_token;
static char *idfile_name;
static char *idfile_token;
char *temp_name;
const char *prefix_client = "";
const char *prefix_server = "";
int line_number = 1;
FILE *header;
FILE *idfile;
static FILE *idfile;
size_t pointer_size = 0;
syskind_t typelib_kind = sizeof(void*) == 8 ? SYS_WIN64 : SYS_WIN32;
......@@ -160,18 +159,18 @@ enum {
static const char short_options[] =
"b:cC:d:D:EhH:I:m:NpP:sS:tT:uU:VW";
static const struct option long_options[] = {
{ "dlldata", 1, 0, DLLDATA_OPTION },
{ "dlldata-only", 0, 0, DLLDATA_ONLY_OPTION },
{ "local-stubs", 1, 0, LOCAL_STUBS_OPTION },
{ "oldnames", 0, 0, OLDNAMES_OPTION },
{ "prefix-all", 1, 0, PREFIX_ALL_OPTION },
{ "prefix-client", 1, 0, PREFIX_CLIENT_OPTION },
{ "prefix-server", 1, 0, PREFIX_SERVER_OPTION },
{ "win32", 0, 0, WIN32_OPTION },
{ "win64", 0, 0, WIN64_OPTION },
{ "win32-align", 1, 0, WIN32_ALIGN_OPTION },
{ "win64-align", 1, 0, WIN64_ALIGN_OPTION },
{ 0, 0, 0, 0 }
{ "dlldata", 1, NULL, DLLDATA_OPTION },
{ "dlldata-only", 0, NULL, DLLDATA_ONLY_OPTION },
{ "local-stubs", 1, NULL, LOCAL_STUBS_OPTION },
{ "oldnames", 0, NULL, OLDNAMES_OPTION },
{ "prefix-all", 1, NULL, PREFIX_ALL_OPTION },
{ "prefix-client", 1, NULL, PREFIX_CLIENT_OPTION },
{ "prefix-server", 1, NULL, PREFIX_SERVER_OPTION },
{ "win32", 0, NULL, WIN32_OPTION },
{ "win64", 0, NULL, WIN64_OPTION },
{ "win32-align", 1, NULL, WIN32_ALIGN_OPTION },
{ "win64-align", 1, NULL, WIN64_ALIGN_OPTION },
{ NULL, 0, NULL, 0 }
};
static void rm_tempfile(void);
......@@ -648,8 +647,8 @@ int main(int argc,char *argv[])
if(debuglevel)
{
setbuf(stdout,0);
setbuf(stderr,0);
setbuf(stdout, NULL);
setbuf(stderr, NULL);
}
parser_debug = debuglevel & DEBUGLEVEL_TRACE ? 1 : 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment