The following commit has been merged in the master branch:
commit 9d6a9e43756d2256473935429d9c2f00ad20fb0e
Author: Guillem Jover <[email protected]>
Date: Thu Oct 7 10:16:16 2010 +0200
Do not make function typedefs pointers
diff --git a/lib/dpkg/myopt.h b/lib/dpkg/myopt.h
index 6c3fb0f..23fcd5f 100644
--- a/lib/dpkg/myopt.h
+++ b/lib/dpkg/myopt.h
@@ -25,7 +25,7 @@
DPKG_BEGIN_DECLS
-typedef void (*void_func)(void);
+typedef void void_func(void);
struct cmdinfo {
const char *olong;
@@ -36,7 +36,7 @@ struct cmdinfo {
void (*call)(const struct cmdinfo*, const char *value);
int arg;
void *parg;
- void_func farg;
+ void_func *farg;
};
extern const char printforhelp[];
@@ -58,7 +58,7 @@ void setaction(const struct cmdinfo *cip, const char *value);
void setobsolete(const struct cmdinfo *cip, const char *value);
#define ACTION(longopt, shortopt, code, func) \
- { longopt, shortopt, 0, NULL, NULL, setaction, code, NULL, (void_func)func }
+ { longopt, shortopt, 0, NULL, NULL, setaction, code, NULL, (void_func *)func }
#define OBSOLETE(longopt, shortopt) \
{ longopt, shortopt, 0, NULL, NULL, setobsolete, 0, NULL, NULL }
diff --git a/lib/dpkg/tarfn.h b/lib/dpkg/tarfn.h
index 2e6a3b4..00c87b3 100644
--- a/lib/dpkg/tarfn.h
+++ b/lib/dpkg/tarfn.h
@@ -62,17 +62,17 @@ struct tar_entry {
struct file_stat stat;
};
-typedef int (*tar_read_func)(void *ctx, char *buffer, int length);
-typedef int (*tar_func)(void *ctx, struct tar_entry *h);
+typedef int tar_read_func(void *ctx, char *buffer, int length);
+typedef int tar_func(void *ctx, struct tar_entry *h);
struct tar_operations {
- tar_read_func read;
+ tar_read_func *read;
- tar_func extract_file;
- tar_func link;
- tar_func symlink;
- tar_func mkdir;
- tar_func mknod;
+ tar_func *extract_file;
+ tar_func *link;
+ tar_func *symlink;
+ tar_func *mkdir;
+ tar_func *mknod;
};
int tar_extractor(void *ctx, const struct tar_operations *ops);
diff --git a/src/main.c b/src/main.c
index 7113b36..79324ef 100644
--- a/src/main.c
+++ b/src/main.c
@@ -453,7 +453,7 @@ static const struct cmdinfo cmdinfos[]= {
* have a very similar structure.
*/
#define ACTIONBACKEND(longopt, shortopt, backend) \
- { longopt, shortopt, 0, NULL, NULL, setaction, 0, (void *)backend,
(void_func)execbackend }
+ { longopt, shortopt, 0, NULL, NULL, setaction, 0, (void *)backend, (void_func
*)execbackend }
ACTION( "install", 'i', act_install,
archivefiles ),
ACTION( "unpack", 0, act_unpack,
archivefiles ),
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]