Update fst and lxt files to latest from GTKWave also update cppcheck file
This commit is contained in:
parent
774d173d69
commit
f17690ebde
263
vpi/cppcheck.sup
263
vpi/cppcheck.sup
|
|
@ -3,33 +3,144 @@
|
|||
// problems will not be fixed.
|
||||
|
||||
// fstapi.c from GTKWave
|
||||
obsoleteFunctionsasctime:fstapi.c:928
|
||||
obsoleteFunctionsalloca:fstapi.c:2316
|
||||
unreadVariable:fstapi.c:1660
|
||||
variableScope:fstapi.c:664
|
||||
variableScope:fstapi.c:1392
|
||||
variableScope:fstapi.c:1991
|
||||
variableScope:fstapi.c:2120
|
||||
variableScope:fstapi.c:2545
|
||||
variableScope:fstapi.c:2737
|
||||
variableScope:fstapi.c:2896
|
||||
variableScope:fstapi.c:2897
|
||||
variableScope:fstapi.c:3615
|
||||
variableScope:fstapi.c:3791
|
||||
variableScope:fstapi.c:4234
|
||||
variableScope:fstapi.c:4243
|
||||
variableScope:fstapi.c:4777
|
||||
variableScope:fstapi.c:4780
|
||||
variableScope:fstapi.c:5278
|
||||
variableScope:fstapi.c:5279
|
||||
variableScope:fstapi.c:5435
|
||||
variableScope:fstapi.c:5493
|
||||
variableScope:fstapi.c:5806
|
||||
variableScope:fstapi.c:5809
|
||||
variableScope:fstapi.c:6045
|
||||
variableScope:fstapi.c:6150
|
||||
variableScope:fstapi.c:6151
|
||||
variableScope:fstapi.c:6182
|
||||
obsoleteFunctionsasctime:fstapi.c:927
|
||||
obsoleteFunctionsalloca:fstapi.c:2301
|
||||
unreadVariable:fstapi.c:1645
|
||||
variableScope:fstapi.c:663
|
||||
variableScope:fstapi.c:1335
|
||||
variableScope:fstapi.c:1336
|
||||
variableScope:fstapi.c:1393
|
||||
variableScope:fstapi.c:1976
|
||||
variableScope:fstapi.c:2105
|
||||
variableScope:fstapi.c:2530
|
||||
variableScope:fstapi.c:2531
|
||||
variableScope:fstapi.c:2722
|
||||
variableScope:fstapi.c:2723
|
||||
variableScope:fstapi.c:2727
|
||||
variableScope:fstapi.c:2843
|
||||
variableScope:fstapi.c:2882
|
||||
variableScope:fstapi.c:2883
|
||||
variableScope:fstapi.c:3601
|
||||
variableScope:fstapi.c:3775
|
||||
variableScope:fstapi.c:3777
|
||||
variableScope:fstapi.c:4219
|
||||
variableScope:fstapi.c:4220
|
||||
variableScope:fstapi.c:4229
|
||||
variableScope:fstapi.c:4492
|
||||
variableScope:fstapi.c:4763
|
||||
variableScope:fstapi.c:4766
|
||||
variableScope:fstapi.c:5260
|
||||
variableScope:fstapi.c:5264
|
||||
variableScope:fstapi.c:5265
|
||||
variableScope:fstapi.c:5421
|
||||
variableScope:fstapi.c:5479
|
||||
variableScope:fstapi.c:5792
|
||||
variableScope:fstapi.c:5795
|
||||
variableScope:fstapi.c:6031
|
||||
variableScope:fstapi.c:6136
|
||||
variableScope:fstapi.c:6137
|
||||
variableScope:fstapi.c:6168
|
||||
variableScope:fstapi.c:6396
|
||||
// These functions are not used by Icarus
|
||||
// fstReaderClrFacProcessMask()
|
||||
unusedFunction:fstapi.c:3333
|
||||
// fstReaderClrFacProcessMaskAll()
|
||||
unusedFunction:fstapi.c:3362
|
||||
// fstReaderGetAliasCount()
|
||||
unusedFunction:fstapi.c:3425
|
||||
// fstReaderGetCurrentFlatScope()
|
||||
unusedFunction:fstapi.c:3171
|
||||
// fstReaderGetAliasCount()
|
||||
unusedFunction:fstapi.c:3268
|
||||
// fstReaderGetCurrentScopeUserInfo()
|
||||
unusedFunction:fstapi.c:3185
|
||||
// fstReaderGetDateString()
|
||||
unusedFunction:fstapi.c:3453
|
||||
// fstReaderGetDoubleEndianMatchState()
|
||||
unusedFunction:fstapi.c:3439
|
||||
// fstReaderGetDumpActivityChangeTime()
|
||||
unusedFunction:fstapi.c:3481
|
||||
// fstReaderGetDumpActivityChangeValue()
|
||||
unusedFunction:fstapi.c:3496
|
||||
// fstReaderGetEndTime()
|
||||
unusedFunction:fstapi.c:3390
|
||||
// fstReaderGetFacProcessMask()
|
||||
unusedFunction:fstapi.c:3296
|
||||
// fstReaderGetFileType()
|
||||
unusedFunction:fstapi.c:3460
|
||||
// fstReaderGetFseekFailed()
|
||||
unusedFunction:fstapi.c:3281
|
||||
// fstReaderGetMaxHandle()
|
||||
unusedFunction:fstapi.c:3418
|
||||
// fstReaderGetMemoryUsedByWriter()
|
||||
unusedFunction:fstapi.c:3397
|
||||
// fstReaderGetNumberDumpActivityChanges()
|
||||
unusedFunction:fstapi.c:3474
|
||||
// fstReaderGetScopeCount()
|
||||
unusedFunction:fstapi.c:3404
|
||||
// fstReaderGetStartTime()
|
||||
unusedFunction:fstapi.c:3383
|
||||
// fstReaderGetTimescale()
|
||||
unusedFunction:fstapi.c:3376
|
||||
// fstReaderGetTimezero()
|
||||
unusedFunction:fstapi.c:3467
|
||||
// fstReaderGetValueChangeSectionCount()
|
||||
unusedFunction:fstapi.c:3432
|
||||
// fstReaderGetValueFromHandleAtTime()
|
||||
unusedFunction:fstapi.c:5674
|
||||
// fstReaderGetVarCount()
|
||||
unusedFunction:fstapi.c:3411
|
||||
// fstReaderGetVersionString()
|
||||
unusedFunction:fstapi.c:3446
|
||||
// fstReaderIterBlocks()
|
||||
unusedFunction:fstapi.c:4641
|
||||
// fstReaderIterBlocksSetNativeDoublesOnCallback()
|
||||
unusedFunction:fstapi.c:3546
|
||||
// fstReaderIterateHier()
|
||||
unusedFunction:fstapi.c:3771
|
||||
// fstReaderIterateHierRewind()
|
||||
unusedFunction:fstapi.c:3751
|
||||
// fstReaderOpen()
|
||||
unusedFunction:fstapi.c:4539
|
||||
// fstReaderOpenForUtilitiesOnly()
|
||||
unusedFunction:fstapi.c:4531
|
||||
// fstReaderPushScope()
|
||||
unusedFunction:fstapi.c:3233
|
||||
// fstReaderResetScope()
|
||||
unusedFunction:fstapi.c:3222
|
||||
// fstReaderSetFacProcessMask()
|
||||
unusedFunction:fstapi.c:3315
|
||||
// fstReaderSetFacProcessMaskAll()
|
||||
unusedFunction:fstapi.c:3351
|
||||
// fstReaderSetLimitTimeRange()
|
||||
unusedFunction:fstapi.c:3511
|
||||
// fstReaderSetUnlimitedTimeRange()
|
||||
unusedFunction:fstapi.c:3524
|
||||
// fstReaderSetVcdExtensions()
|
||||
unusedFunction:fstapi.c:3535
|
||||
// fstUtilityEscToBin()
|
||||
unusedFunction:fstapi.c:6474
|
||||
// fstWriterCreateVar2()
|
||||
unusedFunction:fstapi.c:2517
|
||||
// fstWriterEmitVariableLengthValueChange()
|
||||
unusedFunction:fstapi.c:2836
|
||||
// fstWriterGetFseekFailed()
|
||||
unusedFunction:fstapi.c:2500
|
||||
// fstWriterSetAttrEnd()
|
||||
unusedFunction:fstapi.c:2703
|
||||
// fstWriterSetComment()
|
||||
unusedFunction:fstapi.c:2355
|
||||
// fstWriterSetEnvVar()
|
||||
unusedFunction:fstapi.c:2361
|
||||
// fstWriterSetFileType()
|
||||
unusedFunction:fstapi.c:2232
|
||||
// fstWriterSetParallelMode()
|
||||
unusedFunction:fstapi.c:2460
|
||||
// fstWriterSetTimezero()
|
||||
unusedFunction:fstapi.c:2425
|
||||
|
||||
// These functions are not used by Icarus
|
||||
//unusedFunction:fstapi.c:226
|
||||
|
||||
// lxt2_write.c from GTKWave
|
||||
obsoleteFunctionsalloca:lxt2_write.c:1813
|
||||
|
|
@ -45,6 +156,27 @@ variableScope:lxt2_write.c:587
|
|||
variableScope:lxt2_write.c:1157
|
||||
variableScope:lxt2_write.c:1613
|
||||
variableScope:lxt2_write.c:2060
|
||||
// These functions are not used by Icarus
|
||||
// lxt2_wr_emit_value_int()
|
||||
unusedFunction:lxt2_write.c:1611
|
||||
// lxt2_wr_inc_time_by_delta()
|
||||
unusedFunction:lxt2_write.c:997
|
||||
// lxt2_wr_inc_time_by_delta64()
|
||||
unusedFunction:lxt2_write.c:1007
|
||||
// lxt2_wr_set_checkpoint_off()
|
||||
unusedFunction:lxt2_write.c:835
|
||||
// lxt2_wr_set_checkpoint_on()
|
||||
unusedFunction:lxt2_write.c:843
|
||||
// lxt2_wr_set_maxgranule()
|
||||
unusedFunction:lxt2_write.c:1567
|
||||
// lxt2_wr_set_partial_preference()
|
||||
unusedFunction:lxt2_write.c:812
|
||||
// lxt2_wr_set_timezero()
|
||||
unusedFunction:lxt2_write.c:2198
|
||||
// lxt2_wr_symbol_bracket_stripping()
|
||||
unusedFunction:lxt2_write.c:1581
|
||||
// lxt2_wr_symbol_find()
|
||||
unusedFunction:lxt2_write.c:877
|
||||
|
||||
// lxt_write.c from GTKWave
|
||||
variableScope:lxt_write.c:31
|
||||
|
|
@ -70,6 +202,83 @@ variableScope:lxt_write.c:2595
|
|||
variableScope:lxt_write.c:2596
|
||||
variableScope:lxt_write.c:2597
|
||||
variableScope:lxt_write.c:2598
|
||||
// These functions are not used by Icarus
|
||||
// lt_emit_value_int()
|
||||
unusedFunction:lxt_write.c:1661
|
||||
// lt_emit_value_string()
|
||||
unusedFunction:lxt_write.c:2144
|
||||
// lt_inc_time_by_delta()
|
||||
unusedFunction:lxt_write.c:1374
|
||||
// lt_inc_time_by_delta64()
|
||||
unusedFunction:lxt_write.c:1384
|
||||
// lt_set_chg_compress()
|
||||
unusedFunction:lxt_write.c:1457
|
||||
// lt_set_dict_compress()
|
||||
unusedFunction:lxt_write.c:1474
|
||||
// lt_set_time()
|
||||
unusedFunction:lxt_write.c:1379
|
||||
// lt_set_timezero()
|
||||
unusedFunction:lxt_write.c:2820
|
||||
// lt_symbol_bracket_stripping()
|
||||
unusedFunction:lxt_write.c:1585
|
||||
// lt_symbol_find()
|
||||
unusedFunction:lxt_write.c:1277
|
||||
|
||||
// fastlz.c from GTKWave
|
||||
// These functions are not used by Icarus
|
||||
// fastlz_compress_level()
|
||||
unusedFunction:fastlz.c:150
|
||||
|
||||
// lz4.c from GTKWave
|
||||
// These functions are not used by Icarus
|
||||
// LZ4_compress_continue()
|
||||
unusedFunction:lz4.c:806
|
||||
// LZ4_compress_forceExtDict()
|
||||
unusedFunction:lz4.c:818
|
||||
// LZ4_compress_limitedOutput()
|
||||
unusedFunction:lz4.c:662
|
||||
// LZ4_compress_limitedOutput_continue()
|
||||
unusedFunction:lz4.c:811
|
||||
// LZ4_compress_limitedOutput_withState()
|
||||
unusedFunction:lz4.c:1223
|
||||
// LZ4_compress_withState()
|
||||
unusedFunction:lz4.c:1212
|
||||
// LZ4_create()
|
||||
unusedFunction:lz4.c:1192
|
||||
// LZ4_createStream()
|
||||
unusedFunction:lz4.c:687
|
||||
// LZ4_createStreamDecode()
|
||||
unusedFunction:lz4.c:1074
|
||||
// LZ4_decompress_fast_continue()
|
||||
unusedFunction:lz4.c:1123
|
||||
// LZ4_decompress_fast_usingDict()
|
||||
unusedFunction:lz4.c:1156
|
||||
// LZ4_decompress_fast_withPrefix64k()
|
||||
unusedFunction:lz4.c:1241
|
||||
// LZ4_decompress_safe_continue()
|
||||
unusedFunction:lz4.c:1103
|
||||
// LZ4_decompress_safe_usingDict()
|
||||
unusedFunction:lz4.c:1151
|
||||
// LZ4_decompress_safe_withPrefix64k()
|
||||
unusedFunction:lz4.c:1236
|
||||
// LZ4_free()
|
||||
unusedFunction:lz4.c:694
|
||||
// LZ4_loadDict()
|
||||
unusedFunction:lz4.c:701
|
||||
// LZ4_resetStreamState()
|
||||
unusedFunction:lz4.c:1185
|
||||
// LZ4_setDictDecode()
|
||||
unusedFunction:lz4.c:1088
|
||||
// LZ4_sizeofState()
|
||||
unusedFunction:lz4.c:1210
|
||||
// LZ4_sizeofStreamState()
|
||||
unusedFunction:lz4.c:1177
|
||||
// LZ4_slideInputBuffer()
|
||||
unusedFunction:lz4.c:1199
|
||||
// LZ4_uncompress()
|
||||
unusedFunction:lz4.c:1171
|
||||
// LZ4_uncompress_unknownOutputSize()
|
||||
unusedFunction:lz4.c:1172
|
||||
|
||||
// The routines in sys_random.c are exact copies from IEEE1364-2005 and
|
||||
// they have scope warnings that we need to ignore.
|
||||
|
|
|
|||
29
vpi/fstapi.c
29
vpi/fstapi.c
|
|
@ -26,7 +26,6 @@
|
|||
* FST_DYNAMIC_ALIAS_DISABLE : dynamic aliases are not processed
|
||||
* FST_DYNAMIC_ALIAS2_DISABLE : new encoding for dynamic aliases is not generated
|
||||
* FST_WRITEX_DISABLE : fast write I/O routines are disabled
|
||||
* FST_DISABLE_DUFFS_DEVICE : only if indirect branches are incredibly bad on host arch
|
||||
*
|
||||
* possible enables:
|
||||
*
|
||||
|
|
@ -979,6 +978,8 @@ if(!xc->curval_mem)
|
|||
|
||||
static void fstDestroyMmaps(struct fstWriterContext *xc, int is_closing)
|
||||
{
|
||||
(void)is_closing;
|
||||
|
||||
fstMunmap(xc->valpos_mem, xc->maxhandle * 4 * sizeof(uint32_t));
|
||||
xc->valpos_mem = NULL;
|
||||
|
||||
|
|
@ -1390,21 +1391,6 @@ for(i=0;i<xc->maxhandle;i++)
|
|||
if(is_binary)
|
||||
{
|
||||
unsigned char acc = 0;
|
||||
#ifdef FST_DISABLE_DUFFS_DEVICE
|
||||
/* old algorithm */
|
||||
int shift = 7 - ((vm4ip[1]-1) & 7);
|
||||
for(idx=vm4ip[1]-1;idx>=0;idx--)
|
||||
{
|
||||
acc |= (pnt[idx] & 1) << shift;
|
||||
shift++;
|
||||
if(shift == 8)
|
||||
{
|
||||
*(--scratchpnt) = acc;
|
||||
shift = 0;
|
||||
acc = 0;
|
||||
}
|
||||
}
|
||||
#else
|
||||
/* new algorithm */
|
||||
idx = ((vm4ip[1]+7) & ~7);
|
||||
switch(vm4ip[1] & 7)
|
||||
|
|
@ -1421,7 +1407,6 @@ for(i=0;i<xc->maxhandle;i++)
|
|||
idx -= 8;
|
||||
} while(idx);
|
||||
}
|
||||
#endif
|
||||
|
||||
scratchpnt = fstCopyVarint32ToLeft(scratchpnt, (time_delta << 1));
|
||||
}
|
||||
|
|
@ -2249,7 +2234,7 @@ void fstWriterSetFileType(void *ctx, enum fstFileType filetype)
|
|||
struct fstWriterContext *xc = (struct fstWriterContext *)ctx;
|
||||
if(xc)
|
||||
{
|
||||
if((filetype >= FST_FT_MIN) && (filetype <= FST_FT_MAX))
|
||||
if(/*(filetype >= FST_FT_MIN) &&*/ (filetype <= FST_FT_MAX))
|
||||
{
|
||||
off_t fpos = ftello(xc->handle);
|
||||
|
||||
|
|
@ -2646,7 +2631,7 @@ struct fstWriterContext *xc = (struct fstWriterContext *)ctx;
|
|||
if(xc)
|
||||
{
|
||||
fputc(FST_ST_VCD_SCOPE, xc->hier_handle);
|
||||
if((scopetype < FST_ST_VCD_MODULE) || (scopetype > FST_ST_MAX)) { scopetype = FST_ST_VCD_MODULE; }
|
||||
if(/*(scopetype < FST_ST_VCD_MODULE) ||*/ (scopetype > FST_ST_MAX)) { scopetype = FST_ST_VCD_MODULE; }
|
||||
fputc(scopetype, xc->hier_handle);
|
||||
fprintf(xc->hier_handle, "%s%c%s%c",
|
||||
scopename ? scopename : "", 0,
|
||||
|
|
@ -2687,7 +2672,7 @@ struct fstWriterContext *xc = (struct fstWriterContext *)ctx;
|
|||
if(xc)
|
||||
{
|
||||
fputc(FST_ST_GEN_ATTRBEGIN, xc->hier_handle);
|
||||
if((attrtype < FST_AT_MISC) || (attrtype > FST_AT_MAX)) { attrtype = FST_AT_MISC; subtype = FST_MT_UNKNOWN; }
|
||||
if(/*(attrtype < FST_AT_MISC) ||*/ (attrtype > FST_AT_MAX)) { attrtype = FST_AT_MISC; subtype = FST_MT_UNKNOWN; }
|
||||
fputc(attrtype, xc->hier_handle);
|
||||
|
||||
switch(attrtype)
|
||||
|
|
@ -4768,7 +4753,7 @@ for(;;)
|
|||
mem_required_for_traversal = fstReaderUint64(xc->f);
|
||||
mem_for_traversal = malloc(mem_required_for_traversal + 66); /* add in potential fastlz overhead */
|
||||
#ifdef FST_DEBUG
|
||||
fprintf(stderr, "sec: %d seclen: %d begtim: %d endtim: %d\n",
|
||||
fprintf(stderr, "sec: %u seclen: %d begtim: %d endtim: %d\n",
|
||||
secnum, (int)seclen, (int)beg_tim, (int)end_tim);
|
||||
fprintf(stderr, "\tmem_required_for_traversal: %d\n", (int)mem_required_for_traversal);
|
||||
#endif
|
||||
|
|
@ -5796,7 +5781,7 @@ mem_required_for_traversal =
|
|||
fstReaderUint64(xc->f);
|
||||
|
||||
#ifdef FST_DEBUG
|
||||
fprintf(stderr, "rvat sec: %d seclen: %d begtim: %d endtim: %d\n",
|
||||
fprintf(stderr, "rvat sec: %u seclen: %d begtim: %d endtim: %d\n",
|
||||
secnum, (int)seclen, (int)beg_tim, (int)end_tim);
|
||||
fprintf(stderr, "\tmem_required_for_traversal: %d\n", (int)mem_required_for_traversal);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1004,7 +1004,7 @@ if(s1->val > s2->val) return(1); else return(-1); /* they're *never* equal */
|
|||
|
||||
static void lt_finalize_dictionary(struct lt_trace *lt)
|
||||
{
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
lt->sorted_dict = calloc(lt->num_dict_entries, sizeof(dslxt_Tree *));
|
||||
|
||||
|
|
@ -1594,7 +1594,7 @@ if(lt)
|
|||
/*
|
||||
* emission for trace values..
|
||||
*/
|
||||
static unsigned int lt_optimask[]=
|
||||
static int lt_optimask[]=
|
||||
{
|
||||
0x00000000,
|
||||
|
||||
|
|
@ -1674,7 +1674,7 @@ while(s->aliased_to) /* find root alias if exists */
|
|||
if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
|
||||
{
|
||||
int numbytes; /* number of bytes to store value minus one */
|
||||
int len = ((s->flags)<_SYM_F_INTEGER) ? 32 : s->len;
|
||||
unsigned int len = ((s->flags)<_SYM_F_INTEGER) ? 32 : s->len;
|
||||
unsigned int last_change_delta;
|
||||
|
||||
if((lt->clock_compress)&&(s->rows==0))
|
||||
|
|
@ -2283,7 +2283,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
|
|||
char prevch;
|
||||
unsigned int last_change_delta;
|
||||
|
||||
int len = ((s->flags)<_SYM_F_INTEGER) ? 32 : s->len;
|
||||
unsigned int len = ((s->flags)<_SYM_F_INTEGER) ? 32 : s->len;
|
||||
|
||||
if((lt->clock_compress)&&(s->rows==0))
|
||||
{
|
||||
|
|
@ -2291,7 +2291,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
|
|||
{
|
||||
int legal = 0;
|
||||
int ivalue = 0;
|
||||
int i;
|
||||
unsigned int i;
|
||||
char *pntv = value;
|
||||
int delta1, delta2;
|
||||
|
||||
|
|
@ -2589,10 +2589,10 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
|
|||
|
||||
if(!tagadd)
|
||||
{
|
||||
int len2 = ((s->flags)<_SYM_F_INTEGER) ? 32 : s->len;
|
||||
unsigned int len2 = ((s->flags)<_SYM_F_INTEGER) ? 32 : s->len;
|
||||
if((mvl & (LT_MVL_2|LT_MVL_4|LT_MVL_9)) == LT_MVL_2)
|
||||
{
|
||||
int i;
|
||||
unsigned int i;
|
||||
int bitpos = 7;
|
||||
int outval = 0;
|
||||
int thisval= 0;
|
||||
|
|
@ -2676,7 +2676,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
|
|||
else
|
||||
if((mvl & (LT_MVL_4|LT_MVL_9)) == LT_MVL_4)
|
||||
{
|
||||
int i;
|
||||
unsigned int i;
|
||||
int bitpos = 6;
|
||||
int outval = 0;
|
||||
int thisval= 0;
|
||||
|
|
@ -2710,7 +2710,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
|
|||
else
|
||||
/* if(mvl & LT_MVL_9) */
|
||||
{
|
||||
int i;
|
||||
unsigned int i;
|
||||
int bitpos = 4;
|
||||
int outval = 0;
|
||||
int thisval= 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue