Update fstapi.c and lxt2_write.c to latest from GTKWave

This just fixes warnings in cppcheck
This commit is contained in:
Cary R 2012-11-15 15:28:40 -08:00
parent f01a106c25
commit afdc1fa923
2 changed files with 3 additions and 15 deletions

View File

@ -171,7 +171,6 @@ return(pnt);
*/
#ifdef FST_DO_MISALIGNED_OPS
#define fstGetUint32(x) (*(uint32_t *)(x))
#define fstWriterSetUint32(x,y) (*(uint32_t *)(x)) = (y)
#else
static uint32_t fstGetUint32(unsigned char *mem)
{
@ -185,17 +184,6 @@ buf[3] = mem[3];
return(*(uint32_t *)buf);
}
static void fstWriterSetUint32(unsigned char *mem, uint32_t u32)
{
unsigned char *buf = (unsigned char *)(&u32);
mem[0] = buf[0];
mem[1] = buf[1];
mem[2] = buf[2];
mem[3] = buf[3];
}
#endif
@ -3106,7 +3094,7 @@ char *pnt;
int ch, scopetype;
int vartype;
uint32_t len, alias;
uint32_t maxvalpos=0;
/* uint32_t maxvalpos=0; */
int num_signal_dyn = 65536;
if(!xc) return(0);
@ -3245,7 +3233,7 @@ while(!feof(xc->fh))
xc->signal_lens[xc->maxhandle] = len;
xc->signal_typs[xc->maxhandle] = vartype;
maxvalpos+=len;
/* maxvalpos+=len; */
if(len > xc->longest_signal_value_len)
{
xc->longest_signal_value_len = len;

View File

@ -2187,7 +2187,7 @@ void lxt2_wr_set_compression_depth(struct lxt2_wr_trace *lt, unsigned int depth)
if(lt)
{
if(depth > 9) depth = 9;
sprintf(lt->zmode, "wb%d", depth);
sprintf(lt->zmode, "wb%u", depth);
}
}