[Patch] Fix compilation of Debian backend under GCC 4.0.2 on Ubuntu
- From: Karl Hegbloom <hegbloom pdx edu>
- To: networkmanager-list gnome org
- Subject: [Patch] Fix compilation of Debian backend under GCC 4.0.2 on Ubuntu
- Date: Mon, 10 Oct 2005 14:51:59 -0700
It would not compile, giving warnings about "no previous prototype" for
several functions declared in the "interface_parser.h" header. It turns
out that they need to have "void" explicitly written into the prototype
now. I also added 'static' to several functions that did not appear to
be part of that module's interface; take it or leave it.
--
Karl Hegbloom <hegbloom pdx edu>
Index: src/backends/interface_parser.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/backends/interface_parser.c,v
retrieving revision 1.5
diff -u -r1.5 interface_parser.c
--- src/backends/interface_parser.c 16 Aug 2005 17:16:40 -0000 1.5
+++ src/backends/interface_parser.c 10 Oct 2005 21:48:23 -0000
@@ -32,7 +32,7 @@
if_data* last_data;
-void add_block(const char *type, const char* name)
+static void add_block(const char *type, const char* name)
{
if_block *ret = (if_block*)calloc(1,sizeof(struct _if_block));
ret->name = g_strdup(name);
@@ -48,7 +48,7 @@
//printf("added block '%s' with type '%s'\n",name,type);
}
-void add_data(const char *key,const char *data)
+static void add_data(const char *key,const char *data)
{
if_data *ret = (if_data*)calloc(1,sizeof(struct _if_data));
ret->key = g_strdup(key);
@@ -133,7 +133,7 @@
fclose(inp);
}
-void _destroy_data(if_data *ifd)
+static void _destroy_data(if_data *ifd)
{
if (ifd == NULL)
return;
@@ -144,7 +144,7 @@
return;
}
-void _destroy_block(if_block* ifb)
+static void _destroy_block(if_block* ifb)
{
if (ifb == NULL)
return;
Index: src/backends/interface_parser.h
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/backends/interface_parser.h,v
retrieving revision 1.2
diff -u -r1.2 interface_parser.h
--- src/backends/interface_parser.h 16 Aug 2005 17:16:40 -0000 1.2
+++ src/backends/interface_parser.h 10 Oct 2005 21:48:23 -0000
@@ -40,12 +40,12 @@
struct _if_block *next;
} if_block;
-void ifparser_init();
-void ifparser_destroy();
+void ifparser_init(void);
+void ifparser_destroy(void);
-const char* ifparser_interfaces();
+const char* ifparser_interfaces(void);
if_block *ifparser_getif(const char* iface);
-if_block *ifparser_getfirst();
+if_block *ifparser_getfirst(void);
const char *ifparser_getkey(if_block* iface, const char *key);
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]