Skip to content

Commit

Permalink
Easy changes for -Wmissing-prototypes
Browse files Browse the repository at this point in the history
  • Loading branch information
ldoolitt authored and caryr committed Jul 10, 2014
1 parent 850d8c3 commit ae6743c
Show file tree
Hide file tree
Showing 17 changed files with 34 additions and 27 deletions.
10 changes: 5 additions & 5 deletions driver/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ static const char** defparm_base = 0;
static int defparm_size = 0;

/* Function to add a command file name to the FIFO. */
void add_cmd_file(const char* filename)
static void add_cmd_file(const char* filename)
{
p_command_file new;

Expand All @@ -205,7 +205,7 @@ void add_cmd_file(const char* filename)
}

/* Function to return the top command file name from the FIFO. */
char *get_cmd_file(void)
static char *get_cmd_file(void)
{
char *filename;

Expand Down Expand Up @@ -625,7 +625,7 @@ void process_file_name(const char*name, int lib_flag)
}
}

int process_generation(const char*name)
static int process_generation(const char*name)
{
if (strcmp(name,"1995") == 0)
generation = "1995";
Expand Down Expand Up @@ -750,7 +750,7 @@ int process_generation(const char*name)
return 0;
}

int process_depfile(const char*name)
static int process_depfile(const char*name)
{
const char*cp = strchr(name, '=');
if (cp) {
Expand Down Expand Up @@ -784,7 +784,7 @@ int process_depfile(const char*name)
/*
* If it exists add the SFT file for the given module.
*/
void add_sft_file(const char *module)
static void add_sft_file(const char *module)
{
char *file;

Expand Down
1 change: 1 addition & 0 deletions driver/substit.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# include <stdlib.h>
# include <stdio.h>
# include "ivl_alloc.h"
# include "globals.h"


char* substitutions(const char*str)
Expand Down
1 change: 1 addition & 0 deletions libveriuser/a_fetch_argc.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

# include <vpi_user.h>
# include <veriuser.h>
# include <acc_user.h>

/*
* acc_fetch_argc implemented using VPI interface
Expand Down
1 change: 1 addition & 0 deletions libveriuser/a_fetch_argv.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

# include <vpi_user.h>
# include <veriuser.h>
# include <acc_user.h>

/*
* acc_fetch_argv implemented using VPI interface
Expand Down
3 changes: 2 additions & 1 deletion libveriuser/nodeinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
# include <vpi_user.h>
# include "priv.h"

struct t_tfnoeinfo* tf_nodeinfo(PLI_INT32 a, struct t_tfnodeinfo*ip)
/* XXX Not declared or used anywhere? */
struct t_tfnodeinfo* tf_nodeinfo(PLI_INT32 a, struct t_tfnodeinfo*ip)
{
(void)a; /* Parameter is not used. */
(void)ip; /* Parameter is not used. */
Expand Down
1 change: 1 addition & 0 deletions libveriuser/nump.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <vpi_user.h>
#include <stdio.h>
#include "veriuser.h"

/*
* tf_nump implemented using VPI interface
Expand Down
2 changes: 1 addition & 1 deletion tgt-stub/expression.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ static void show_ternary_expression(ivl_expr_t net, unsigned ind)
}
}

void show_unary_expression(ivl_expr_t net, unsigned ind)
static void show_unary_expression(ivl_expr_t net, unsigned ind)
{
unsigned width = ivl_expr_width(net);
const char*sign = ivl_expr_signed(net)? "signed" : "unsigned";
Expand Down
2 changes: 1 addition & 1 deletion tgt-stub/statement.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ static void show_stmt_trigger(ivl_statement_t net, unsigned ind)
* The wait statement contains simply an array of events to wait on,
* and a sub-statement to execute when an event triggers.
*/
void show_stmt_wait(ivl_statement_t net, unsigned ind)
static void show_stmt_wait(ivl_statement_t net, unsigned ind)
{
unsigned idx;
const char*comma = "";
Expand Down
2 changes: 1 addition & 1 deletion tgt-vlog95/expr.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ static void emit_expr_real_number(ivl_scope_t scope, ivl_expr_t expr,
/*
* Class properties are not supported in vlog95, but they can be translated.
*/
void emit_class_property(ivl_scope_t scope, ivl_expr_t expr, unsigned wid)
static void emit_class_property(ivl_scope_t scope, ivl_expr_t expr, unsigned wid)
{
ivl_signal_t sig = ivl_expr_signal(expr);
(void)wid; /* Parameter is not used. */
Expand Down
2 changes: 1 addition & 1 deletion tgt-vlog95/logic_lpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ static void emit_lpm_part_pv(ivl_scope_t scope, ivl_lpm_t lpm)
fprintf(vlog_out, "]");
}

unsigned output_is_module_instantiation_input(ivl_scope_t scope,
static unsigned output_is_module_instantiation_input(ivl_scope_t scope,
ivl_nexus_t nex)
{
unsigned idx, count = ivl_nexus_ptrs(nex);
Expand Down
6 changes: 3 additions & 3 deletions tgt-vlog95/scope.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static const char*get_time_const(int time_value)
}
}

void emit_func_return(ivl_signal_t sig)
static void emit_func_return(ivl_signal_t sig)
{
if (ivl_signal_dimensions(sig) > 0) {
fprintf(stderr, "%s:%u: vlog95 error: A function cannot return "
Expand Down Expand Up @@ -86,7 +86,7 @@ static void emit_sig_id(ivl_signal_t sig)
fprintf(vlog_out, "\n");
}

void emit_var_def(ivl_signal_t sig)
static void emit_var_def(ivl_signal_t sig)
{
if (ivl_signal_local(sig)) return;
fprintf(vlog_out, "%*c", indent, ' ');
Expand Down Expand Up @@ -199,7 +199,7 @@ static void save_net_constants(ivl_scope_t scope, ivl_signal_t sig)
}
}

void emit_net_def(ivl_scope_t scope, ivl_signal_t sig)
static void emit_net_def(ivl_scope_t scope, ivl_signal_t sig)
{
int msb, lsb;
get_sig_msb_lsb(sig, &msb, &lsb);
Expand Down
6 changes: 4 additions & 2 deletions tgt-vvp/vvp_scope.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const char* vvp_signal_label(ivl_signal_t sig)
return buf;
}

ivl_signal_t signal_of_nexus(ivl_nexus_t nex, unsigned*word)
static ivl_signal_t signal_of_nexus(ivl_nexus_t nex, unsigned*word)
{
unsigned idx;
for (idx = 0 ; idx < ivl_nexus_ptrs(nex) ; idx += 1) {
Expand Down Expand Up @@ -180,7 +180,7 @@ ivl_variable_type_t data_type_of_nexus(ivl_nexus_t nex)
}


ivl_nexus_ptr_t ivl_logic_pin_ptr(ivl_net_logic_t net, unsigned pin)
static ivl_nexus_ptr_t ivl_logic_pin_ptr(ivl_net_logic_t net, unsigned pin)
{
ivl_nexus_t nex = ivl_logic_pin(net, pin);
unsigned idx;
Expand All @@ -201,6 +201,7 @@ ivl_nexus_ptr_t ivl_logic_pin_ptr(ivl_net_logic_t net, unsigned pin)
return 0;
}

#if 0
const char*drive_string(ivl_drive_t drive)
{
switch (drive) {
Expand All @@ -224,6 +225,7 @@ const char*drive_string(ivl_drive_t drive)

return "";
}
#endif


/*
Expand Down
4 changes: 2 additions & 2 deletions vpi/sys_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
/*
* Routine to add the given time to the the total time (high/low).
*/
void add_to_wait_time(uint64_t *high, uint64_t *low, uint64_t c_time)
static void add_to_wait_time(uint64_t *high, uint64_t *low, uint64_t c_time)
{
uint64_t carry = 0U;

Expand All @@ -71,7 +71,7 @@ void add_to_wait_time(uint64_t *high, uint64_t *low, uint64_t c_time)
* Routine to divide the given total time (high/low) by the number of
* items to get the average.
*/
uint64_t calc_average_wait_time(uint64_t high, uint64_t low, uint64_t total)
static uint64_t calc_average_wait_time(uint64_t high, uint64_t low, uint64_t total)
{
int bit = 64;
uint64_t result = 0U;
Expand Down
14 changes: 7 additions & 7 deletions vpi/sys_random.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static double chi_square(long *seed, long deg_of_free);
static double t(long *seed, long deg_of_free);
static double erlangian(long *seed, long k, long mean);

long rtl_dist_chi_square(long *seed, long df)
static long rtl_dist_chi_square(long *seed, long df)
{
double r;
long i;
Expand All @@ -64,7 +64,7 @@ long rtl_dist_chi_square(long *seed, long df)
return i;
}

long rtl_dist_erlang(long *seed, long k, long mean)
static long rtl_dist_erlang(long *seed, long k, long mean)
{
double r;
long i;
Expand All @@ -87,7 +87,7 @@ long rtl_dist_erlang(long *seed, long k, long mean)
return i;
}

long rtl_dist_exponential(long *seed, long mean)
static long rtl_dist_exponential(long *seed, long mean)
{
double r;
long i;
Expand All @@ -110,7 +110,7 @@ long rtl_dist_exponential(long *seed, long mean)
return i;
}

long rtl_dist_normal(long *seed, long mean, long sd)
static long rtl_dist_normal(long *seed, long mean, long sd)
{
double r;
long i;
Expand All @@ -127,7 +127,7 @@ long rtl_dist_normal(long *seed, long mean, long sd)
return i;
}

long rtl_dist_poisson(long *seed, long mean)
static long rtl_dist_poisson(long *seed, long mean)
{
long i;

Expand All @@ -142,7 +142,7 @@ long rtl_dist_poisson(long *seed, long mean)
return i;
}

long rtl_dist_t(long *seed, long df)
static long rtl_dist_t(long *seed, long df)
{
double r;
long i;
Expand All @@ -166,7 +166,7 @@ long rtl_dist_t(long *seed, long df)
}

/* copied from IEEE1364-2001, with slight modifications for 64bit machines. */
long rtl_dist_uniform(long *seed, long start, long end)
static long rtl_dist_uniform(long *seed, long start, long end)
{
double r;
long i;
Expand Down
2 changes: 1 addition & 1 deletion vpi/table_mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static p_table_mod create_table(void)
* Check to see if this is a constant string. It returns 1 if the argument
* is a constant string otherwise it returns 0.
*/
unsigned is_const_string_obj(vpiHandle arg)
static unsigned is_const_string_obj(vpiHandle arg)
{
unsigned rtn = 0;

Expand Down
2 changes: 1 addition & 1 deletion vpi/v2005_math.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ static void va_error_message(vpiHandle callh, const char *format,
/*
* Process an argument.
*/
vpiHandle va_process_argument(vpiHandle callh, const char *name,
static vpiHandle va_process_argument(vpiHandle callh, const char *name,
vpiHandle arg, const char *post) {
PLI_INT32 type;

Expand Down
2 changes: 1 addition & 1 deletion vpi/va_math.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ static void va_error_message(vpiHandle callh, const char *format,
/*
* Process an argument.
*/
vpiHandle va_process_argument(vpiHandle callh, const char *name,
static vpiHandle va_process_argument(vpiHandle callh, const char *name,
vpiHandle arg, const char *post) {
PLI_INT32 type;

Expand Down

0 comments on commit ae6743c

Please sign in to comment.