Fix some clang warnings

This commit is contained in:
Cary R 2024-11-26 23:33:05 -08:00
parent 62727e8b2e
commit 527b0daed6
11 changed files with 19 additions and 19 deletions

View File

@ -4,7 +4,7 @@
%{ %{
/* /*
* Copyright (c) 2001-2021 Stephen Williams (steve@icarus.com) * Copyright (c) 2001-2024 Stephen Williams (steve@icarus.com)
* *
* This source code is free software; you can redistribute it * This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU * and/or modify it in source code form under the terms of the GNU
@ -222,7 +222,7 @@ static char* trim_trailing_white(char*text, int trim)
return strdup(text); return strdup(text);
} }
int yywrap() int yywrap(void)
{ {
return 1; return 1;
} }

View File

@ -1446,7 +1446,7 @@ static void process_ucdrive(const char*txt)
uc_drive = ucd; uc_drive = ucd;
} }
int yywrap() int yywrap(void)
{ {
return 1; return 1;
} }

View File

@ -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 * This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU * and/or modify it in source code form under the terms of the GNU
@ -21,7 +21,7 @@
int acc_error_flag; int acc_error_flag;
int acc_initialize() int acc_initialize(void)
{ {
acc_error_flag = 0; acc_error_flag = 0;

View File

@ -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 * This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU * and/or modify it in source code form under the terms of the GNU
@ -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); vpiHandle hand = vpi_handle(vpiScope, cur_instance);
return vpi_get(vpiTimeUnit, hand); return vpi_get(vpiTimeUnit, hand);

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011-2021 Cary R. (cygcary@yahoo.com) * Copyright (C) 2011-2024 Cary R. (cygcary@yahoo.com)
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -23,7 +23,7 @@
static unsigned need_ivl_top_module = 0; 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) { if (need_ivl_top_module) {
fprintf(vlog_out, fprintf(vlog_out,

View File

@ -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 * 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. * 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 /* Emit the copyright information and LGPL note and then emit any
* needed primitives. */ * needed primitives. */

View File

@ -1023,7 +1023,7 @@ static void add_scope_to_list(ivl_scope_t scope)
scopes_emitted[num_scopes_emitted-1] = ivl_scope_tname(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); free(scopes_emitted);
scopes_emitted = 0; scopes_emitted = 0;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2011 Cary R. (cygcary@yahoo.com) * Copyright (C) 2011-2024 Cary R. (cygcary@yahoo.com)
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -246,7 +246,7 @@ void add_udp_to_list(ivl_udp_t udp)
udps[num_udps-1] = udp; udps[num_udps-1] = udp;
} }
void emit_udp_list() void emit_udp_list(void)
{ {
unsigned idx; unsigned idx;
for (idx = 0; idx < num_udps; idx += 1) { for (idx = 0; idx < num_udps; idx += 1) {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003-2020 Stephen Williams (steve@icarus.com) * Copyright (c) 2003-2024 Stephen Williams (steve@icarus.com)
* *
* This source code is free software; you can redistribute it * This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU * and/or modify it in source code form under the terms of the GNU
@ -29,7 +29,7 @@
static unsigned long word_alloc_mask = 0x0f; static unsigned long word_alloc_mask = 0x0f;
int allocate_word() int allocate_word(void)
{ {
int res = 4; int res = 4;

View File

@ -326,7 +326,7 @@ static char* strdupnew(char const *str)
%% %%
int yywrap() int yywrap(void)
{ {
return -1; return -1;
} }

View File

@ -1,7 +1,7 @@
#ifndef IVL_vpi_priv_H #ifndef IVL_vpi_priv_H
#define IVL_vpi_priv_H #define IVL_vpi_priv_H
/* /*
* Copyright (c) 2001-2021 Stephen Williams (steve@icarus.com) * Copyright (c) 2001-2024 Stephen Williams (steve@icarus.com)
* Copyright (c) 2016 CERN Michele Castellana (michele.castellana@cern.ch) * Copyright (c) 2016 CERN Michele Castellana (michele.castellana@cern.ch)
* *
* This source code is free software; you can redistribute it * This source code is free software; you can redistribute it
@ -968,9 +968,9 @@ struct __vpiBinaryConst : public __vpiHandle {
vvp_vector4_t bits; vvp_vector4_t bits;
/* TRUE if this constant is signed. */ /* 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) */ /* 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); vpiHandle vpip_make_binary_const(unsigned wid, const char*bits);