tools: fix -Wmissing-declarations

Stefan Huehner stefan at huehner.org
Wed Jun 15 08:01:33 CDT 2005


Hi,

attached patches fixed somes -Wmissing-declarations warnings by making
functions static which aren't used anywhere outside the file.
3 seperate files for
- tools/bin2res.c
- tools/sfnt2fnt.c
- tools/widl/{header.c,proxy.c,servre.c}

ChangeLog
- fix some -Wmissing-declarations by making functions static

Regards,
Stefan

-------------- next part --------------
Index: bin2res.c
===================================================================
RCS file: /home/wine/wine/tools/bin2res.c,v
retrieving revision 1.23
diff -u -p -r1.23 bin2res.c
--- bin2res.c	6 Sep 2004 20:26:35 -0000	1.23
+++ bin2res.c	15 Jun 2005 12:17:14 -0000
@@ -64,13 +64,13 @@ static const char* help =
 	"To force processing of all resources, use the -f flag.\n"
 	"To process a particular file, use the -i/-o options.\n";
 
-void usage(void)
+static void usage(void)
 {
     printf(help);
     exit(1);
 }
 
-int insert_hexdump (FILE* outfile, FILE* infile)
+static int insert_hexdump (FILE* outfile, FILE* infile)
 {
     int i, c;
 
@@ -86,14 +86,14 @@ int insert_hexdump (FILE* outfile, FILE*
     return 1;
 }
 
-int hex2bin(char c)
+static int hex2bin(char c)
 {
     if (!isxdigit(c)) return -1024;
     if (isdigit(c)) return c - '0';
     return toupper(c) - 'A' + 10;
 }
 
-int extract_hexdump (FILE* outfile, FILE* infile)
+static int extract_hexdump (FILE* outfile, FILE* infile)
 {
     int byte, c;
 
@@ -110,7 +110,7 @@ int extract_hexdump (FILE* outfile, FILE
     return 1;
 }
 
-const char* parse_marker(const char *line, time_t* last_updated)
+static const char* parse_marker(const char *line, time_t* last_updated)
 {
     static char res_file_name[PATH_MAX], *rpos, *wpos;
     struct stat st;
@@ -125,7 +125,7 @@ const char* parse_marker(const char *lin
     return res_file_name;
 }
 
-int process_resources(const char* input_file_name, const char* specific_file_name, 
+static int process_resources(const char* input_file_name, const char* specific_file_name, 
 		      int inserting, int force_processing, int verbose)
 {
     char buffer[2048], tmp_file_name[PATH_MAX];
-------------- next part --------------
Index: sfnt2fnt.c
===================================================================
RCS file: /home/wine/wine/tools/sfnt2fnt.c,v
retrieving revision 1.6
diff -u -p -r1.6 sfnt2fnt.c
--- sfnt2fnt.c	20 May 2005 09:41:37 -0000	1.6
+++ sfnt2fnt.c	15 Jun 2005 12:20:50 -0000
@@ -54,13 +54,13 @@ typedef struct {
 
 #include "poppack.h"
 
-void usage(char **argv)
+static void usage(char **argv)
 {
     fprintf(stderr, "%s foo.ttf ppem enc dpi def_char avg_width\n", argv[0]);
     return;
 }
 
-int lookup_charset(int enc)
+static int lookup_charset(int enc)
 {
     /* FIXME: make winelib app and use TranslateCharsetInfo */
     switch(enc) {
-------------- next part --------------
Index: header.c
===================================================================
RCS file: /home/wine/wine/tools/widl/header.c,v
retrieving revision 1.34
diff -u -p -r1.34 header.c
--- header.c	5 Mar 2005 10:49:22 -0000	1.34
+++ header.c	15 Jun 2005 12:58:20 -0000
@@ -80,7 +80,7 @@ int is_void(type_t *t, var_t *v)
   return 0;
 }
 
-void write_guid(const char *guid_prefix, const char *name, UUID *uuid)
+static void write_guid(const char *guid_prefix, const char *name, UUID *uuid)
 {
   if (!uuid) return;
   fprintf(header, "DEFINE_GUID(%s_%s, 0x%08lx, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x,"
@@ -713,25 +713,25 @@ void write_forward(type_t *iface)
   }
 }
 
-void write_iface_guid(type_t *iface)
+static void write_iface_guid(type_t *iface)
 {
   UUID *uuid = get_attrp(iface->attrs, ATTR_UUID);
   write_guid("IID", iface->name, uuid);
 } 
 
-void write_dispiface_guid(type_t *iface)
+static void write_dispiface_guid(type_t *iface)
 {
   UUID *uuid = get_attrp(iface->attrs, ATTR_UUID);
   write_guid("DIID", iface->name, uuid);
 }
 
-void write_coclass_guid(class_t *cocl)
+static void write_coclass_guid(class_t *cocl)
 {
   UUID *uuid = get_attrp(cocl->attrs, ATTR_UUID);
   write_guid("CLSID", cocl->name, uuid);
 }
 
-void write_com_interface(type_t *iface)
+static void write_com_interface(type_t *iface)
 {
   if (!iface->funcs && !iface->ref) {
     yywarning("%s has no methods", iface->name);
@@ -793,7 +793,7 @@ void write_com_interface(type_t *iface)
   fprintf(header,"\n#endif  /* __%s_INTERFACE_DEFINED__ */\n\n", iface->name);
 }
 
-void write_rpc_interface(type_t *iface)
+static void write_rpc_interface(type_t *iface)
 {
   unsigned long ver = get_attrv(iface->attrs, ATTR_VERSION);
   char *var = get_attrp(iface->attrs, ATTR_IMPLICIT_HANDLE);
Index: proxy.c
===================================================================
RCS file: /home/wine/wine/tools/widl/proxy.c,v
retrieving revision 1.20
diff -u -p -r1.20 proxy.c
--- proxy.c	26 Jan 2005 19:40:47 -0000	1.20
+++ proxy.c	15 Jun 2005 12:58:20 -0000
@@ -141,7 +141,7 @@ static void write_formatstring( int proc
   print_proxy( "\n");
 }
 
-static void init_proxy()
+static void init_proxy(void)
 {
   if (proxy) return;
   if(!(proxy = fopen(proxy_name, "w")))
Index: server.c
===================================================================
RCS file: /home/wine/wine/tools/widl/server.c,v
retrieving revision 1.3
diff -u -p -r1.3 server.c
--- server.c	15 Apr 2005 14:09:45 -0000	1.3
+++ server.c	15 Jun 2005 12:58:20 -0000
@@ -124,7 +124,7 @@ static void write_typeformatstring(void)
 }
 
 
-unsigned int get_required_stack_size(type_t *type)
+static unsigned int get_required_stack_size(type_t *type)
 {
     switch(type->type)
     {


More information about the wine-patches mailing list