Eliminate a few more easy warnings
Testing with 32-bit clang 3.3, with additional compiler flags
-Wsign-compare -Wundef
this patch eliminates the following warnings:
config.h💯6: warning: 'UINT64_T_AND_ULONG_SAME' is not defined, evaluates to 0 [-Wundef]
vcd_priv2.cc:233:12: warning: duplicate 'extern' declaration specifier [-Wduplicate-decl-specifier]
parse.cc:6496:9: warning: comparison of 0 <= unsigned expression is always true [-Wtautological-compare]
parse.cc:6499:13: warning: comparison of 0 <= unsigned expression is always true [-Wtautological-compare]
parse.cc:6502:9: warning: comparison of 0 <= unsigned expression is always true [-Wtautological-compare]
parse.cc:6510:53: warning: comparison of integers of different signs: 'const unsigned int' and 'int' [-Wsign-compare]
Changing the vlltype elements from unsigned to int reconciles their
type with the native bison YYLTYPE structure.
This commit is contained in:
parent
467e8afc41
commit
850d8c3ee9
|
|
@ -30,10 +30,10 @@
|
|||
* YYLTYPE compels the lexor to use this type and not something other.
|
||||
*/
|
||||
struct vlltype {
|
||||
unsigned first_line;
|
||||
unsigned first_column;
|
||||
unsigned last_line;
|
||||
unsigned last_column;
|
||||
int first_line;
|
||||
int first_column;
|
||||
int last_line;
|
||||
int last_column;
|
||||
const char*text;
|
||||
std::string get_fileline() const;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ extern "C" void vcd_work_sync(void)
|
|||
}
|
||||
}
|
||||
|
||||
extern "C" extern "C" void vcd_work_flush(void)
|
||||
extern "C" void vcd_work_flush(void)
|
||||
{
|
||||
struct vcd_work_item_s*cell = grab_item();
|
||||
cell->type = WT_FLUSH;
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ typedef uint64_t vvp_time64_t;
|
|||
# define TIME_FMT_X PRIx64
|
||||
#endif
|
||||
|
||||
# if UINT64_T_AND_ULONG_SAME
|
||||
# ifdef UINT64_T_AND_ULONG_SAME
|
||||
# define UL_AND_TIME64_SAME
|
||||
# endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue