Skip to content

Commit

Permalink
Fix some clang warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
caryr committed Nov 27, 2024
1 parent 62727e8 commit 527b0da
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions driver/cflexor.lex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

%{
/*
* Copyright (c) 2001-2021 Stephen Williams ([email protected])
* Copyright (c) 2001-2024 Stephen Williams ([email protected])
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
Expand Down Expand Up @@ -222,7 +222,7 @@ static char* trim_trailing_white(char*text, int trim)
return strdup(text);
}

int yywrap()
int yywrap(void)
{
return 1;
}
Expand Down
2 changes: 1 addition & 1 deletion lexor.lex
Original file line number Diff line number Diff line change
Expand Up @@ -1446,7 +1446,7 @@ static void process_ucdrive(const char*txt)
uc_drive = ucd;
}

int yywrap()
int yywrap(void)
{
return 1;
}
Expand Down
4 changes: 2 additions & 2 deletions libveriuser/a_initialize.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002 Michael Ruff (mruff at chiaro.com)
* Copyright (c) 2002-2024 Michael Ruff (mruff at chiaro.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
Expand All @@ -21,7 +21,7 @@

int acc_error_flag;

int acc_initialize()
int acc_initialize(void)
{
acc_error_flag = 0;

Expand Down
4 changes: 2 additions & 2 deletions libveriuser/getsimtime.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002-2020 Michael Ruff (mruff at chiaro.com)
* Copyright (c) 2002-2024 Michael Ruff (mruff at chiaro.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
Expand Down Expand Up @@ -217,7 +217,7 @@ PLI_INT32 tf_igettimeprecision(void*obj)
}


PLI_INT32 tf_gettimeunit()
PLI_INT32 tf_gettimeunit(void)
{
vpiHandle hand = vpi_handle(vpiScope, cur_instance);
return vpi_get(vpiTimeUnit, hand);
Expand Down
4 changes: 2 additions & 2 deletions tgt-vlog95/event.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2011-2021 Cary R. ([email protected])
* Copyright (C) 2011-2024 Cary R. ([email protected])
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -23,7 +23,7 @@

static unsigned need_ivl_top_module = 0;

void emit_icarus_generated_top_module()
void emit_icarus_generated_top_module(void)
{
if (need_ivl_top_module) {
fprintf(vlog_out,
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 @@ -1580,7 +1580,7 @@ static unsigned need_latch_prim = 0;
* simulate a synthesized D-FF, etc., but we don't want them to take the
* ideas behind the primitive(s) and claim them as their own.
*/
void emit_icarus_generated_udps()
void emit_icarus_generated_udps(void)
{
/* Emit the copyright information and LGPL note and then emit any
* needed primitives. */
Expand Down
2 changes: 1 addition & 1 deletion tgt-vlog95/scope.c
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ static void add_scope_to_list(ivl_scope_t scope)
scopes_emitted[num_scopes_emitted-1] = ivl_scope_tname(scope);
}

void free_emitted_scope_list()
void free_emitted_scope_list(void)
{
free(scopes_emitted);
scopes_emitted = 0;
Expand Down
4 changes: 2 additions & 2 deletions tgt-vlog95/udp.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2011 Cary R. ([email protected])
* Copyright (C) 2011-2024 Cary R. ([email protected])
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -246,7 +246,7 @@ void add_udp_to_list(ivl_udp_t udp)
udps[num_udps-1] = udp;
}

void emit_udp_list()
void emit_udp_list(void)
{
unsigned idx;
for (idx = 0; idx < num_udps; idx += 1) {
Expand Down
4 changes: 2 additions & 2 deletions tgt-vvp/eval_real.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003-2020 Stephen Williams ([email protected])
* Copyright (c) 2003-2024 Stephen Williams ([email protected])
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
Expand Down Expand Up @@ -29,7 +29,7 @@

static unsigned long word_alloc_mask = 0x0f;

int allocate_word()
int allocate_word(void)
{
int res = 4;

Expand Down
2 changes: 1 addition & 1 deletion vvp/lexor.lex
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ static char* strdupnew(char const *str)

%%

int yywrap()
int yywrap(void)
{
return -1;
}
Expand Down
6 changes: 3 additions & 3 deletions vvp/vpi_priv.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef IVL_vpi_priv_H
#define IVL_vpi_priv_H
/*
* Copyright (c) 2001-2021 Stephen Williams ([email protected])
* Copyright (c) 2001-2024 Stephen Williams ([email protected])
* Copyright (c) 2016 CERN Michele Castellana ([email protected])
*
* This source code is free software; you can redistribute it
Expand Down Expand Up @@ -968,9 +968,9 @@ struct __vpiBinaryConst : public __vpiHandle {

vvp_vector4_t bits;
/* TRUE if this constant is signed. */
int signed_flag :1;
unsigned signed_flag :1;
/* TRUE if this constant has an explicit size (i.e. 19'h0 vs. 'h0) */
int sized_flag :1;
unsigned sized_flag :1;
};

vpiHandle vpip_make_binary_const(unsigned wid, const char*bits);
Expand Down

0 comments on commit 527b0da

Please sign in to comment.