summaryrefslogtreecommitdiff
path: root/upb
diff options
context:
space:
mode:
authorEsun Kim <veblush@google.com>2019-07-30 17:16:50 -0700
committerEsun Kim <veblush@google.com>2019-07-30 18:32:08 -0700
commit2c3a28e411bdf51e045ee207bc8a48aac42475dc (patch)
treed2a70e88d1a55ba51b619146e688fbb4f1c506fc /upb
parent76d75aec66e1e6f173f3b6668601108ed453f3d3 (diff)
Add -Wstrict-prototypes option
Diffstat (limited to 'upb')
-rw-r--r--upb/def.c2
-rw-r--r--upb/def.h2
-rw-r--r--upb/json/parser.h2
-rw-r--r--upb/json/parser.rl2
-rw-r--r--upb/legacy_msg_reflection.c2
-rw-r--r--upb/legacy_msg_reflection.h2
-rw-r--r--upb/pb/compile_decoder.c2
-rw-r--r--upb/pb/encoder.c2
-rw-r--r--upb/pb/encoder.h2
-rw-r--r--upb/pb/textprinter.c2
-rw-r--r--upb/pb/textprinter.h2
-rw-r--r--upb/upb.h4
12 files changed, 13 insertions, 13 deletions
diff --git a/upb/def.c b/upb/def.c
index b51f22a..005c012 100644
--- a/upb/def.c
+++ b/upb/def.c
@@ -1633,7 +1633,7 @@ void upb_symtab_free(upb_symtab *s) {
upb_gfree(s);
}
-upb_symtab *upb_symtab_new() {
+upb_symtab *upb_symtab_new(void) {
upb_symtab *s = upb_gmalloc(sizeof(*s));
upb_alloc *alloc;
diff --git a/upb/def.h b/upb/def.h
index c88ce90..9be2857 100644
--- a/upb/def.h
+++ b/upb/def.h
@@ -837,7 +837,7 @@ class upb::FileDefPtr {
extern "C" {
#endif
-upb_symtab *upb_symtab_new();
+upb_symtab *upb_symtab_new(void);
void upb_symtab_free(upb_symtab* s);
const upb_msgdef *upb_symtab_lookupmsg(const upb_symtab *s, const char *sym);
const upb_msgdef *upb_symtab_lookupmsg2(
diff --git a/upb/json/parser.h b/upb/json/parser.h
index c063a77..d323c52 100644
--- a/upb/json/parser.h
+++ b/upb/json/parser.h
@@ -113,7 +113,7 @@ typedef struct upb_json_codecache upb_json_codecache;
extern "C" {
#endif
-upb_json_codecache *upb_json_codecache_new();
+upb_json_codecache *upb_json_codecache_new(void);
void upb_json_codecache_free(upb_json_codecache *cache);
const upb_json_parsermethod* upb_json_codecache_get(upb_json_codecache* cache,
const upb_msgdef* md);
diff --git a/upb/json/parser.rl b/upb/json/parser.rl
index f80ed18..e026c3e 100644
--- a/upb/json/parser.rl
+++ b/upb/json/parser.rl
@@ -2958,7 +2958,7 @@ const upb_byteshandler *upb_json_parsermethod_inputhandler(
return &m->input_handler_;
}
-upb_json_codecache *upb_json_codecache_new() {
+upb_json_codecache *upb_json_codecache_new(void) {
upb_alloc *alloc;
upb_json_codecache *c;
diff --git a/upb/legacy_msg_reflection.c b/upb/legacy_msg_reflection.c
index 81a878b..031aa4e 100644
--- a/upb/legacy_msg_reflection.c
+++ b/upb/legacy_msg_reflection.c
@@ -349,7 +349,7 @@ struct upb_mapiter {
upb_fieldtype_t key_type;
};
-size_t upb_mapiter_sizeof() {
+size_t upb_mapiter_sizeof(void) {
return sizeof(upb_mapiter);
}
diff --git a/upb/legacy_msg_reflection.h b/upb/legacy_msg_reflection.h
index b33ec68..c54bfb9 100644
--- a/upb/legacy_msg_reflection.h
+++ b/upb/legacy_msg_reflection.h
@@ -173,7 +173,7 @@ bool upb_map_del(upb_map *map, upb_msgval key);
* and if you keep invalidating the iterator during iteration, the program may
* enter an infinite loop. */
-size_t upb_mapiter_sizeof();
+size_t upb_mapiter_sizeof(void);
void upb_mapiter_begin(upb_mapiter *i, const upb_map *t);
upb_mapiter *upb_mapiter_new(const upb_map *t, upb_alloc *a);
diff --git a/upb/pb/compile_decoder.c b/upb/pb/compile_decoder.c
index a7d1ac3..1b40302 100644
--- a/upb/pb/compile_decoder.c
+++ b/upb/pb/compile_decoder.c
@@ -69,7 +69,7 @@ static void freegroup(mgroup *g) {
upb_gfree(g);
}
-mgroup *newgroup() {
+mgroup *newgroup(void) {
mgroup *g = upb_gmalloc(sizeof(*g));
upb_inttable_init(&g->methods, UPB_CTYPE_PTR);
g->bytecode = NULL;
diff --git a/upb/pb/encoder.c b/upb/pb/encoder.c
index e7092a8..d108a64 100644
--- a/upb/pb/encoder.c
+++ b/upb/pb/encoder.c
@@ -524,7 +524,7 @@ void upb_pb_encoder_reset(upb_pb_encoder *e) {
/* public API *****************************************************************/
-upb_handlercache *upb_pb_encoder_newcache() {
+upb_handlercache *upb_pb_encoder_newcache(void) {
return upb_handlercache_new(newhandlers_callback, NULL);
}
diff --git a/upb/pb/encoder.h b/upb/pb/encoder.h
index 1113c3a..f125b37 100644
--- a/upb/pb/encoder.h
+++ b/upb/pb/encoder.h
@@ -45,7 +45,7 @@ upb_pb_encoder* upb_pb_encoder_create(upb_arena* a, const upb_handlers* h,
/* Lazily builds and caches handlers that will push encoded data to a bytessink.
* Any msgdef objects used with this object must outlive it. */
-upb_handlercache *upb_pb_encoder_newcache();
+upb_handlercache *upb_pb_encoder_newcache(void);
#ifdef __cplusplus
} /* extern "C" { */
diff --git a/upb/pb/textprinter.c b/upb/pb/textprinter.c
index 7aafffc..0760173 100644
--- a/upb/pb/textprinter.c
+++ b/upb/pb/textprinter.c
@@ -329,7 +329,7 @@ upb_textprinter *upb_textprinter_create(upb_arena *arena, const upb_handlers *h,
return p;
}
-upb_handlercache *upb_textprinter_newcache() {
+upb_handlercache *upb_textprinter_newcache(void) {
return upb_handlercache_new(&onmreg, NULL);
}
diff --git a/upb/pb/textprinter.h b/upb/pb/textprinter.h
index 0af2b1a..7e20d75 100644
--- a/upb/pb/textprinter.h
+++ b/upb/pb/textprinter.h
@@ -31,7 +31,7 @@ upb_textprinter *upb_textprinter_create(upb_arena *arena, const upb_handlers *h,
upb_bytessink output);
void upb_textprinter_setsingleline(upb_textprinter *p, bool single_line);
upb_sink upb_textprinter_input(upb_textprinter *p);
-upb_handlercache *upb_textprinter_newcache();
+upb_handlercache *upb_textprinter_newcache(void);
#ifdef __cplusplus
} /* extern "C" */
diff --git a/upb/upb.h b/upb/upb.h
index 7b5d1c1..11aa38c 100644
--- a/upb/upb.h
+++ b/upb/upb.h
@@ -222,7 +222,7 @@ UPB_INLINE void *upb_arena_realloc(upb_arena *a, void *ptr, size_t oldsize,
return upb_realloc(upb_arena_alloc(a), ptr, oldsize, size);
}
-UPB_INLINE upb_arena *upb_arena_new() {
+UPB_INLINE upb_arena *upb_arena_new(void) {
return upb_arena_init(NULL, 0, &upb_alloc_global);
}
@@ -287,7 +287,7 @@ template <int N> class upb::InlinedArena : public upb::Arena {
/* Constants ******************************************************************/
/* Generic function type. */
-typedef void upb_func();
+typedef void upb_func(void);
/* A list of types as they are encoded on-the-wire. */
typedef enum {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback