Two compiler warning fixes.
This commit is contained in:
parent
94dcd658c8
commit
884349caab
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2002-2020 Michael Ruff (mruff at chiaro.com)
|
||||
* Copyright (c) 2002-2025 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
|
||||
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
# include <assert.h>
|
||||
# include <ctype.h>
|
||||
# include <stdint.h>
|
||||
# include <veriuser.h>
|
||||
# include <vpi_user.h>
|
||||
# include "priv.h"
|
||||
|
|
@ -52,7 +53,7 @@ PLI_INT32 tf_igetp(PLI_INT32 n, void *obj)
|
|||
vpi_get_value(arg_h, &value);
|
||||
/* The following may generate a compilation warning, but this
|
||||
* functionality is required by some versions of the standard. */
|
||||
rtn = (int) value.value.str; /* Oh my */
|
||||
rtn = (int)(intptr_t)value.value.str; /* Oh my */
|
||||
} else {
|
||||
value.format = vpiIntVal;
|
||||
vpi_get_value(arg_h, &value);
|
||||
|
|
|
|||
|
|
@ -270,7 +270,8 @@ static PLI_INT32 atohex_calltf(ICARUS_VPI_CONST PLI_BYTE8*name)
|
|||
*/
|
||||
static void value_to_text_base(char*text, long val, long base)
|
||||
{
|
||||
static const char digit_map[16] __attribute__ ((nonstring)) = "0123456789abcdef";
|
||||
static const char digit_map[16] = { '0','1','2','3','4','5','6','7',
|
||||
'8','9','a','b','c','d','e','f' };
|
||||
char* ptr;
|
||||
|
||||
assert(base <= 16);
|
||||
|
|
|
|||
Loading…
Reference in New Issue