summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2015-11-03 11:08:01 +0100
committerXavier Leroy <xavier.leroy@inria.fr>2015-11-03 11:08:01 +0100
commit27c467c7778fb010a7ec23ea4f8042837b1204a6 (patch)
tree4ebd296b5343a3f89cc6b2a6b616fe0b9e682bcc
parent335c53bfd85fd49002cfaf5a9195a9e47b814d57 (diff)
downloadocaml-27c467c7778fb010a7ec23ea4f8042837b1204a6.tar.gz
byterun/ yacc/ : replace some K&R function declarations with proper prototypes.
-rw-r--r--byterun/caml/fix_code.h2
-rw-r--r--byterun/fix_code.c4
-rw-r--r--yacc/closure.c6
-rw-r--r--yacc/lr0.c2
4 files changed, 7 insertions, 7 deletions
diff --git a/byterun/caml/fix_code.h b/byterun/caml/fix_code.h
index 419ad327a5..c639894523 100644
--- a/byterun/caml/fix_code.h
+++ b/byterun/caml/fix_code.h
@@ -25,7 +25,7 @@ extern code_t caml_start_code;
extern asize_t caml_code_size;
extern unsigned char * caml_saved_code;
-void caml_init_code_fragments();
+void caml_init_code_fragments(void);
void caml_load_code (int fd, asize_t len);
void caml_fixup_endianness (code_t code, asize_t len);
void caml_set_instruction (code_t pos, opcode_t instr);
diff --git a/byterun/fix_code.c b/byterun/fix_code.c
index 99a400cb83..0d7c8cbaf9 100644
--- a/byterun/fix_code.c
+++ b/byterun/fix_code.c
@@ -35,7 +35,7 @@ unsigned char * caml_saved_code;
/* Read the main bytecode block from a file */
-void caml_init_code_fragments() {
+void caml_init_code_fragments(void) {
struct code_fragment * cf;
/* Register the code in the table of code fragments */
cf = caml_stat_alloc(sizeof(struct code_fragment));
@@ -96,7 +96,7 @@ char ** caml_instr_table;
char * caml_instr_base;
static int* opcode_nargs = NULL;
-int* caml_init_opcode_nargs()
+int* caml_init_opcode_nargs(void)
{
if( opcode_nargs == NULL ){
int* l = (int*)caml_stat_alloc(sizeof(int) * FIRST_UNIMPLEMENTED_OP);
diff --git a/yacc/closure.c b/yacc/closure.c
index d84c125bf2..21a161e1e3 100644
--- a/yacc/closure.c
+++ b/yacc/closure.c
@@ -23,9 +23,9 @@ static unsigned *EFF;
-void print_EFF ();
-void print_first_derives ();
-void print_closure ();
+void print_EFF (void);
+void print_first_derives (void);
+void print_closure (void);
void set_EFF(void)
{
diff --git a/yacc/lr0.c b/yacc/lr0.c
index a5a62d341c..1106eb7d90 100644
--- a/yacc/lr0.c
+++ b/yacc/lr0.c
@@ -48,7 +48,7 @@ void initialize_states (void);
void save_reductions (void);
void new_itemsets (void);
void save_shifts (void);
-void print_derives ();
+void print_derives (void);
void show_cores (void), show_ritems (void), show_rrhs (void), show_shifts (void);
void allocate_itemsets(void)