Hello community,

here is the log from the commit of package gtkwave for openSUSE:Factory checked 
in at 2014-03-22 09:07:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gtkwave (Old)
 and      /work/SRC/openSUSE:Factory/.gtkwave.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gtkwave"

Changes:
--------
--- /work/SRC/openSUSE:Factory/gtkwave/gtkwave.changes  2014-02-16 
19:53:32.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.gtkwave.new/gtkwave.changes     2014-03-22 
09:07:09.000000000 +0100
@@ -1,0 +2,11 @@
+Fri Mar 21 21:30:30 UTC 2014 - [email protected]
+
+- Update to version 3.3.58
+  * Added /Data Format/Popcnt function for ones counting.
+  * Warnings fixes from new Clang 3.4 scan-build.
+  * Updated VCD ID generation in various helpers to use a faster,
+    equivalent algorithm.
+  * Change [1] at end of struct to C99 [] notation with appropriate
+    allocation size modification.
+
+-------------------------------------------------------------------

Old:
----
  gtkwave-3.3.57.tar.gz

New:
----
  gtkwave-3.3.58.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gtkwave.spec ++++++
--- /var/tmp/diff_new_pack.nuIx8E/_old  2014-03-22 09:07:10.000000000 +0100
+++ /var/tmp/diff_new_pack.nuIx8E/_new  2014-03-22 09:07:10.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           gtkwave
-Version:        3.3.57
+Version:        3.3.58
 Release:        0
 Summary:        Waveform viewer for Ditital Signals
 License:        GPL-2.0+

++++++ gtkwave-3.3.57.tar.gz -> gtkwave-3.3.58.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/ChangeLog new/gtkwave-3.3.58/ChangeLog
--- old/gtkwave-3.3.57/ChangeLog        2014-02-13 23:23:05.000000000 +0100
+++ new/gtkwave-3.3.58/ChangeLog        2014-03-16 06:31:40.000000000 +0100
@@ -1454,3 +1454,10 @@
                Added missing compressBound() for compress2() dest mallocs.
 3.3.57 13feb14 Fix for Electric Fence crash in vlist_freeze().
                Updated LZ4 for version r113.
+3.3.58 16mar14 Added /Data Format/Popcnt function for ones counting.
+               Warnings fixes from new Clang 3.4 scan-build.
+               Updated VCD ID generation in various helpers to use a faster,
+               equivalent algorithm.
+               Change [1] at end of struct to C99 [] notation with appropriate
+               allocation size modification.
+               System_profiler speed fix for OSX.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/LICENSE.TXT 
new/gtkwave-3.3.58/LICENSE.TXT
--- old/gtkwave-3.3.57/LICENSE.TXT      2014-02-10 06:14:41.000000000 +0100
+++ new/gtkwave-3.3.58/LICENSE.TXT      2014-02-14 21:26:10.000000000 +0100
@@ -1,6 +1,6 @@
 ##########################################################################
 
-GTKWave 3.3.56 Wave Viewer is Copyright (C) 1999-2014 Tony Bybell.  
+GTKWave 3.3.58 Wave Viewer is Copyright (C) 1999-2014 Tony Bybell.  
 Portions of GTKWave are Copyright (C) 1999-2014 Udi Finkelstein. 
 Context support is Copyright (C) 2007-2014 Kermin Elliott Fleming.
 Trace group support is  Copyright (C) 2009-2014 Donald Baltus.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/configure new/gtkwave-3.3.58/configure
--- old/gtkwave-3.3.57/configure        2014-02-13 02:19:57.000000000 +0100
+++ new/gtkwave-3.3.58/configure        2014-02-14 21:26:10.000000000 +0100
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for gtkwave 3.3.57.
+# Generated by GNU Autoconf 2.69 for gtkwave 3.3.58.
 #
 # Report bugs to <[email protected]>.
 #
@@ -580,8 +580,8 @@
 # Identity of this package.
 PACKAGE_NAME='gtkwave'
 PACKAGE_TARNAME='gtkwave'
-PACKAGE_VERSION='3.3.57'
-PACKAGE_STRING='gtkwave 3.3.57'
+PACKAGE_VERSION='3.3.58'
+PACKAGE_STRING='gtkwave 3.3.58'
 PACKAGE_BUGREPORT='[email protected]'
 PACKAGE_URL=''
 
@@ -1382,7 +1382,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures gtkwave 3.3.57 to adapt to many kinds of systems.
+\`configure' configures gtkwave 3.3.58 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1448,7 +1448,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of gtkwave 3.3.57:";;
+     short | recursive ) echo "Configuration of gtkwave 3.3.58:";;
    esac
   cat <<\_ACEOF
 
@@ -1593,7 +1593,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-gtkwave configure 3.3.57
+gtkwave configure 3.3.58
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2237,7 +2237,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by gtkwave $as_me 3.3.57, which was
+It was created by gtkwave $as_me 3.3.58, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3104,7 +3104,7 @@
 
 # Define the identity of the package.
  PACKAGE='gtkwave'
- VERSION='3.3.57'
+ VERSION='3.3.58'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -10959,7 +10959,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by gtkwave $as_me 3.3.57, which was
+This file was extended by gtkwave $as_me 3.3.58, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -11025,7 +11025,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-gtkwave config.status 3.3.57
+gtkwave config.status 3.3.58
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/configure.ac 
new/gtkwave-3.3.58/configure.ac
--- old/gtkwave-3.3.57/configure.ac     2014-02-13 02:19:57.000000000 +0100
+++ new/gtkwave-3.3.58/configure.ac     2014-02-14 21:26:10.000000000 +0100
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.59)
-AC_INIT(gtkwave, 3.3.57, [email protected])
+AC_INIT(gtkwave, 3.3.58, [email protected])
 AC_CONFIG_SRCDIR([src/vcd.c])
 AM_INIT_AUTOMAKE
 AC_CONFIG_HEADER([config.h])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gtkwave-3.3.57/contrib/bundle_for_osx/Info-gtkwave.plist 
new/gtkwave-3.3.58/contrib/bundle_for_osx/Info-gtkwave.plist
--- old/gtkwave-3.3.57/contrib/bundle_for_osx/Info-gtkwave.plist        
2014-02-13 02:19:57.000000000 +0100
+++ new/gtkwave-3.3.58/contrib/bundle_for_osx/Info-gtkwave.plist        
2014-02-14 21:26:10.000000000 +0100
@@ -8,7 +8,7 @@
     <key>CFBundleExecutable</key>
     <string>gtkwave</string>
     <key>CFBundleGetInfoString</key>
-    <string>3.3.57, (C) 1999-2014 Tony Bybell 
http://gtkwave.sourceforge.net</string>
+    <string>3.3.58, (C) 1999-2014 Tony Bybell 
http://gtkwave.sourceforge.net</string>
     <key>CFBundleIconFile</key>
     <string>gtkwave.icns</string>
     <key>CFBundleIdentifier</key>
@@ -18,11 +18,11 @@
     <key>CFBundlePackageType</key>
     <string>APPL</string>
     <key>CFBundleShortVersionString</key>
-    <string>3.3.57</string>
+    <string>3.3.58</string>
     <key>CFBundleSignature</key>
     <string>????</string>
     <key>CFBundleVersion</key>
-    <string>3.3.57</string>
+    <string>3.3.58</string>
     <key>NSHumanReadableCopyright</key>
     <string>Copyright 1999 - 2014 Tony Bybell, GNU General Public 
License.</string>
     <key>LSMinimumSystemVersion</key>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/contrib/fsdb2vcd/fsdb2vcd_fast.cc 
new/gtkwave-3.3.58/contrib/fsdb2vcd/fsdb2vcd_fast.cc
--- old/gtkwave-3.3.57/contrib/fsdb2vcd/fsdb2vcd_fast.cc        2014-02-06 
23:48:05.000000000 +0100
+++ new/gtkwave-3.3.58/contrib/fsdb2vcd/fsdb2vcd_fast.cc        2014-03-14 
19:56:00.000000000 +0100
@@ -91,21 +91,13 @@
 {
 static char buf[16];
 char *pnt = buf;
-unsigned int vmod;
 
 /* zero is illegal for a value...it is assumed they start at one */
-for(;;)
+while (value)
         {
-        if((vmod = (value % 94)))
-                       {
-                *(pnt++) = (char)(vmod + 32);
-                }
-                else
-                       {
-                *(pnt++) = '~'; value -= 94;
-                }
+        value--;
+        *(pnt++) = (char)('!' + value % 94);
         value = value / 94;
-        if(!value) { break; }
         }
 
 *pnt = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/contrib/rtlbrowse/stem_recurse.c 
new/gtkwave-3.3.58/contrib/rtlbrowse/stem_recurse.c
--- old/gtkwave-3.3.57/contrib/rtlbrowse/stem_recurse.c 2012-02-23 
22:42:57.000000000 +0100
+++ new/gtkwave-3.3.58/contrib/rtlbrowse/stem_recurse.c 2014-03-01 
23:50:23.000000000 +0100
@@ -383,7 +383,7 @@
 rec_tree(modules, &mod_cnt);
 /* printf("number of modules: %d\n", mod_cnt); */
 
-mod_list = calloc(mod_cnt, sizeof(ds_Tree *));
+mod_list = calloc(mod_cnt /* scan-build */ ? mod_cnt : 1, sizeof(ds_Tree *));
 mod_cnt = 0;
 rec_tree_populate(modules, &mod_cnt, mod_list);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/contrib/rtlbrowse/tcl_helper.c 
new/gtkwave-3.3.58/contrib/rtlbrowse/tcl_helper.c
--- old/gtkwave-3.3.57/contrib/rtlbrowse/tcl_helper.c   2011-02-04 
21:50:48.000000000 +0100
+++ new/gtkwave-3.3.58/contrib/rtlbrowse/tcl_helper.c   2014-03-01 
23:50:23.000000000 +0100
@@ -809,7 +809,10 @@
 
        for(i=impcnt-1;i>=0;i--) /* reverse list so it is forwards in rtlbrowse 
*/
                {
-               bwlogbox(fta[i]->fullname, 640 + 8*8, fta[i], 0);
+               if(fta[i]) /* scan-build */
+                       {
+                       bwlogbox(fta[i]->fullname, 640 + 8*8, fta[i], 0);
+                       }
                }
 
        free(fta);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/contrib/vermin/args.c 
new/gtkwave-3.3.58/contrib/vermin/args.c
--- old/gtkwave-3.3.57/contrib/vermin/args.c    2012-06-17 20:20:46.000000000 
+0200
+++ new/gtkwave-3.3.58/contrib/vermin/args.c    2014-03-01 23:50:23.000000000 
+0100
@@ -180,5 +180,7 @@
                total_args++;
                }
        }
+
+free(shadow_list); /* scan-build */
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/contrib/vermin/jrb.c 
new/gtkwave-3.3.58/contrib/vermin/jrb.c
--- old/gtkwave-3.3.57/contrib/vermin/jrb.c     2012-06-17 20:20:46.000000000 
+0200
+++ new/gtkwave-3.3.58/contrib/vermin/jrb.c     2014-03-01 23:50:23.000000000 
+0100
@@ -130,7 +130,7 @@
 {
   JRB head;
  
-  head = (JRB) malloc (sizeof(struct jrb_node));
+  head = (JRB) calloc (1, sizeof(struct jrb_node)); /* scan-build because of 
sethead() below */
   head->flink = head;
   head->blink = head;
   head->parent = head;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/contrib/vermin/shred.c 
new/gtkwave-3.3.58/contrib/vermin/shred.c
--- old/gtkwave-3.3.57/contrib/vermin/shred.c   2012-06-17 20:20:46.000000000 
+0200
+++ new/gtkwave-3.3.58/contrib/vermin/shred.c   2014-03-01 23:50:23.000000000 
+0100
@@ -19,7 +19,7 @@
 {
 shred_root=shred_pnt=(void **)calloc(SHRED_ROOT_SIZE,sizeof(void *));  /* with 
12+ preclevels this is more than enough */
 exp_root=exp_pnt=(void **)calloc(EXP_ROOT_SIZE,sizeof(void *));                
/* dictates longest expr */
-exp_now_root=exp_now_pnt=(void ***)calloc(EXP_NOW_SIZE,sizeof(void *)); /* 
levels of parentheses */
+exp_now_root=exp_now_pnt=(void ***)calloc(EXP_NOW_SIZE,sizeof(void **)); /* 
levels of parentheses */
 }
 
 void shred_free(void)
Files old/gtkwave-3.3.57/doc/gtkwave.odt and new/gtkwave-3.3.58/doc/gtkwave.odt 
differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/analyzer.c 
new/gtkwave-3.3.58/src/analyzer.c
--- old/gtkwave-3.3.57/src/analyzer.c   2012-02-12 05:01:49.000000000 +0100
+++ new/gtkwave-3.3.58/src/analyzer.c   2014-03-01 23:50:23.000000000 +0100
@@ -1,5 +1,5 @@
 /* 
- * Copyright (c) Tony Bybell 1999-2012.
+ * Copyright (c) Tony Bybell 1999-2014.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -109,9 +109,12 @@
          if (IsGroupEnd(t))
            {
              Trptr g_begin = t->t_prev->t_grp;
-             t->t_grp = g_begin->t_grp;
-             t->t_match = g_begin;
-             g_begin->t_match = t;
+             if(g_begin) /* scan-build */
+               {
+               t->t_grp = g_begin->t_grp;
+               t->t_match = g_begin;
+               g_begin->t_match = t;
+               }
            }
          else
            { 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/analyzer.h 
new/gtkwave-3.3.58/src/analyzer.h
--- old/gtkwave-3.3.57/src/analyzer.h   2013-12-08 03:37:33.000000000 +0100
+++ new/gtkwave-3.3.58/src/analyzer.h   2014-03-04 00:59:31.000000000 +0100
@@ -142,7 +142,7 @@
 {
 TimeType time;
 vptr next;
-unsigned char v[1];
+unsigned char v[]; /* C99 */
 } VectorEnt;
 
 #ifdef WAVE_USE_STRUCT_PACKING
@@ -395,7 +395,7 @@
     int     nnbits;            /* number of bits in this vector */
     baptr attribs;             /* for keeping track of combined timeshifts and 
inversions (and for savefile) */
     
-    nptr    nodes[1];          /* pointers to the bits (nodes)  */
+    nptr    nodes[];           /* C99 pointers to the bits (nodes)  */
   } Bits;
 
 #ifdef WAVE_USE_STRUCT_PACKING
@@ -418,7 +418,7 @@
     int     nbits;             /* number of bits in this vector         */
     int     numregions;                /* number of regions that follow        
 */
     bptr    bits;              /* pointer to Bits structs for save file */
-    vptr    vectors[1];                /* pointers to the vectors              
 */
+    vptr    vectors[];         /* C99 pointers to the vectors           */
   } BitVector;
 
 #ifdef WAVE_USE_STRUCT_PACKING
@@ -521,7 +521,8 @@
   TR_ZEROFILL_B, TR_ONEFILL_B, TR_CLOSED_B, TR_GRP_BEGIN_B, 
   TR_GRP_END_B,
   TR_BINGRAY_B, TR_GRAYBIN_B,
-  TR_REAL2BITS_B, TR_TTRANSLATED_B
+  TR_REAL2BITS_B, TR_TTRANSLATED_B,
+  TR_POPCNT_B
 };
  
 #define TR_HIGHLIGHT           (1<<TR_HIGHLIGHT_B)
@@ -564,6 +565,8 @@
 #define TR_PTRANSLATED (1<<TR_PTRANSLATED_B)
 #define TR_TTRANSLATED  (1<<TR_TTRANSLATED_B)
 
+#define TR_POPCNT      (1<<TR_POPCNT_B)
+
 #define TR_ANALOGMASK  (TR_ANALOG_STEP|TR_ANALOG_INTERPOLATED)
 
 Trptr GiveNextTrace(Trptr t);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/baseconvert.c 
new/gtkwave-3.3.58/src/baseconvert.c
--- old/gtkwave-3.3.57/src/baseconvert.c        2013-10-07 09:14:43.000000000 
+0200
+++ new/gtkwave-3.3.58/src/baseconvert.c        2014-02-25 22:36:14.000000000 
+0100
@@ -1,5 +1,5 @@
 /* 
- * Copyright (c) Tony Bybell 1999-2009.
+ * Copyright (c) Tony Bybell 1999-2014.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -29,14 +29,15 @@
 #endif
 
 /*
- * convert binary <=> gray in place
+ * convert binary <=> gray/popcnt in place
  */
 #define cvt_gray(f,p,n) \
 do { \
-if((f)&TR_GRAYMASK) \
+if((f)&(TR_GRAYMASK|TR_POPCNT)) \
        { \
        if((f)&TR_BINGRAY) { convert_bingray((p),(n)); } \
        if((f)&TR_GRAYBIN) { convert_graybin((p),(n)); } \
+       if((f)&TR_POPCNT)  { convert_popcnt((p),(n)); } \
        } \
 } while(0)
 
@@ -137,6 +138,35 @@
        }
 }
 
+
+static void convert_popcnt(char *pnt, int nbits)
+{
+int i;
+unsigned int pop = 0;
+
+for(i=0;i<nbits;i++)
+       {
+       char ch = pnt[i];
+
+       switch(ch)
+               {
+               case AN_1:
+               case AN_H:      pop++;
+                               break;
+       
+               default:
+                               break;  
+                       }
+       
+       }
+
+for(i=nbits-1;i>=0;i--) /* always requires less number of bits */
+       {
+       pnt[i] = (pop & 1) ? AN_1 : AN_0;
+       pop >>= 1;
+       }
+}
+
 
 /*
  * convert trptr+vptr into an ascii string
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/bitvec.c 
new/gtkwave-3.3.58/src/bitvec.c
--- old/gtkwave-3.3.57/src/bitvec.c     2013-07-19 07:21:05.000000000 +0200
+++ new/gtkwave-3.3.58/src/bitvec.c     2014-03-04 00:59:31.000000000 +0100
@@ -251,7 +251,7 @@
 
 h=(hptr *)calloc_2(b->nnbits, sizeof(hptr));
 
-numextrabytes=(b->nnbits)-1;
+numextrabytes=b->nnbits;
 
 for(i=0;i<b->nnbits;i++)
        {
@@ -380,11 +380,11 @@
 
 vadd=(vptr)calloc_2(1,sizeof(struct VectorEnt)+numextrabytes);
 vadd->time=MAX_HISTENT_TIME;
-for(i=0;i<=numextrabytes;i++) vadd->v[i]=AN_U; /* formerly 0x55 */
+for(i=0;i<numextrabytes;i++) vadd->v[i]=AN_U; /* formerly 0x55 */
 if(vcurr) { vcurr->next=vadd; } /* scan-build */
 regions++;
 
-bitvec=(bvptr)calloc_2(1,sizeof(struct BitVector)+((regions-1)*sizeof(vptr))); 
/* ajb : found "regions" by manual inspection, changed to "regions-1" as array 
is already [1] */
+bitvec=(bvptr)calloc_2(1,sizeof(struct BitVector)+((regions)*sizeof(vptr))); 
/* ajb : found "regions" by manual inspection, changed to "regions-1" as array 
is already [1] */ /* C99, back to regions with [] */
 
 strcpy(bitvec->bvname=(char *)malloc_2(strlen(b->name)+1),b->name);
 bitvec->nbits=b->nnbits;
@@ -666,8 +666,7 @@
 ifnode:
 if(nodepnt)
        {
-       b=(struct Bits *)calloc_2(1,sizeof(struct Bits)+(nodepnt-1)*
-                                 sizeof(struct Node *));
+       b=(struct Bits *)calloc_2(1,sizeof(struct Bits)+(nodepnt)*sizeof(struct 
Node *));
 
        for(i=0;i<nodepnt;i++)
                {
@@ -831,8 +830,7 @@
 ifnode:
 if(nodepnt)
        {
-       b=(struct Bits *)calloc_2(1,sizeof(struct Bits)+(nodepnt-1)*
-                                 sizeof(struct Node *));
+       b=(struct Bits *)calloc_2(1,sizeof(struct Bits)+(nodepnt)*sizeof(struct 
Node *));
 
        b->attribs = calloc_2(nodepnt, sizeof(struct BitAttributes));
 
@@ -884,8 +882,7 @@
 
 if(nodepnt)
        {
-       b=(struct Bits *)calloc_2(1,sizeof(struct Bits)+(nodepnt-1)*
-                                 sizeof(struct Node *));
+       b=(struct Bits *)calloc_2(1,sizeof(struct Bits)+(nodepnt)*sizeof(struct 
Node *));
 
        for(i=0;i<nodepnt;i++)
                {
@@ -981,8 +978,7 @@
 
 if(nodepnt)
        {
-       b=(struct Bits *)calloc_2(1,sizeof(struct Bits)+(nodepnt-1)*
-                                 sizeof(struct Node *));
+       b=(struct Bits *)calloc_2(1,sizeof(struct Bits)+(nodepnt)*sizeof(struct 
Node *));
 
        for(i=0;i<nodepnt;i++)
                {
@@ -1192,8 +1188,7 @@
 
 if(nodepnt)
        {
-       b=(struct Bits *)calloc_2(1,sizeof(struct Bits)+(nodepnt-1)*
-                                 sizeof(struct Node *));
+       b=(struct Bits *)calloc_2(1,sizeof(struct Bits)+(nodepnt)*sizeof(struct 
Node *));
 
        for(i=0;i<nodepnt;i++)
                {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/fgetdynamic.h 
new/gtkwave-3.3.58/src/fgetdynamic.h
--- old/gtkwave-3.3.57/src/fgetdynamic.h        2011-05-30 04:19:08.000000000 
+0200
+++ new/gtkwave-3.3.58/src/fgetdynamic.h        2014-03-04 00:59:31.000000000 
+0100
@@ -18,7 +18,7 @@
 struct wave_script_args {
   struct wave_script_args *curr;
   struct wave_script_args *next;
-  char payload[1];
+  char payload[]; /* C99 */
 };
 
 char *fgetmalloc(FILE *handle);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/fst.c new/gtkwave-3.3.58/src/fst.c
--- old/gtkwave-3.3.57/src/fst.c        2013-10-25 20:56:32.000000000 +0200
+++ new/gtkwave-3.3.58/src/fst.c        2014-03-04 00:59:31.000000000 +0100
@@ -459,7 +459,7 @@
 
 static void fst_append_graft_chain(int len, char *nam, int which, struct tree 
*par)
 {
-struct tree *t = talloc_2(sizeof(struct tree) + len);
+struct tree *t = talloc_2(sizeof(struct tree) + len + 1);
 
 memcpy(t->name, nam, len+1);
 t->t_which = which;
@@ -758,6 +758,7 @@
                else /* convert any variable length records into strings */
                {
                nvt = ND_GEN_STRING;
+               nvd = ND_DIR_IMPLICIT;
                GLOBALS->mvlfacs_fst_c_3[i].flags = VZT_RD_SYM_F_STRING;
                GLOBALS->mvlfacs_fst_c_3[i].len = 2;
                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/ghw.c new/gtkwave-3.3.58/src/ghw.c
--- old/gtkwave-3.3.57/src/ghw.c        2012-05-04 18:34:43.000000000 +0200
+++ new/gtkwave-3.3.58/src/ghw.c        2014-03-04 00:59:31.000000000 +0100
@@ -1,5 +1,5 @@
 /*  GHDL Wavefile reader interface.
-    Copyright (C) 2005-2011 Tristan Gingold and Tony Bybell
+    Copyright (C) 2005-2014 Tristan Gingold and Tony Bybell
 
     GHDL is free software; you can redistribute it and/or modify it under
     the terms of the GNU General Public License as published by the Free
@@ -456,7 +456,7 @@
         GLOBALS->curnode->symbol=s;
 
       GLOBALS->nbr_sig_ref_ghw_c_1++;
-      res = (struct tree *) calloc_2(1, sizeof (struct tree) + strlen(pfx));
+      res = (struct tree *) calloc_2(1, sizeof (struct tree) + strlen(pfx) + 
1);
       strcpy(res->name, (char *)pfx);
       res->t_which = *(*sig)++;
 
@@ -466,7 +466,7 @@
     case ghdl_rtik_subtype_array_ptr:
       {
        struct tree *r;
-       res = (struct tree *) calloc_2(1, sizeof (struct tree) + strlen(pfx));
+       res = (struct tree *) calloc_2(1, sizeof (struct tree) + strlen(pfx) + 
1);
        strcpy(res->name, (char *)pfx);
        res->t_which = WAVE_T_WHICH_UNDEFINED_COMPNAME;
        r = res;
@@ -481,7 +481,7 @@
        struct tree *c;
        int i;
 
-       res = (struct tree *) calloc_2(1, sizeof (struct tree) + strlen(pfx));
+       res = (struct tree *) calloc_2(1, sizeof (struct tree) + strlen(pfx) + 
1);
        strcpy(res->name, (char *)pfx);
        res->t_which = WAVE_T_WHICH_UNDEFINED_COMPNAME;
 
@@ -549,7 +549,7 @@
          name_len = strlen (hie->name);
          buf_len = strlen (buf);
 
-          t = (struct tree *) calloc_2(1, sizeof (struct tree) + (2 + buf_len 
+ name_len));
+          t = (struct tree *) calloc_2(1, sizeof (struct tree) + (2 + buf_len 
+ name_len + 1));
          t->kind = ttype;
          n = t->name;
 
@@ -565,13 +565,13 @@
         {
           if(hie->name)
                {
-               t = (struct tree *) calloc_2(1, sizeof (struct tree) + 
strlen(hie->name));
+               t = (struct tree *) calloc_2(1, sizeof (struct tree) + 
strlen(hie->name) + 1);
                t->kind = ttype;
                strcpy(t->name, (char *)hie->name);
                }
                else
                {
-               t = (struct tree *) calloc_2(1, sizeof (struct tree));
+               t = (struct tree *) calloc_2(1, sizeof (struct tree) + 1);
                t->kind = ttype;
                }
         }
@@ -1133,9 +1133,9 @@
  {
  const char *base_hier = "top";
 
- struct tree *t = calloc_2(1, sizeof(struct tree) + strlen(base_hier));
+ struct tree *t = calloc_2(1, sizeof(struct tree) + strlen(base_hier) + 1);
  memcpy(t, GLOBALS->treeroot, sizeof(struct tree));
- strcpy(t->name, base_hier);
+ strcpy(t->name, base_hier); /* scan-build false warning here, thinks name[1] 
is total length */
 #ifndef WAVE_TALLOC_POOL_SIZE
  free_2(GLOBALS->treeroot); /* if using tree alloc pool, can't deallocate this 
*/
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/ghwlib.c 
new/gtkwave-3.3.58/src/ghwlib.c
--- old/gtkwave-3.3.57/src/ghwlib.c     2011-11-29 22:56:05.000000000 +0100
+++ new/gtkwave-3.3.58/src/ghwlib.c     2014-03-02 00:05:21.000000000 +0100
@@ -1,5 +1,5 @@
 /*  GHDL Wavefile reader library.
-    Copyright (C) 2005-2012 Tristan Gingold
+    Copyright (C) 2005-2014 Tristan Gingold
 
     GHDL is free software; you can redistribute it and/or modify it under
     the terms of the GNU General Public License as published by the Free
@@ -462,6 +462,12 @@
 int
 ghw_get_range_length (union ghw_range *rng)
 {
+if(!rng) /* scan-build */
+       {
+       fprintf (stderr, "get_range_length: null pointer passed, is GHW file 
corrupt?\n");
+       abort ();
+       }
+
   switch (rng->kind)
     {
     case ghdl_rtik_type_i32:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/helpers/fst/fastlz.c 
new/gtkwave-3.3.58/src/helpers/fst/fastlz.c
--- old/gtkwave-3.3.57/src/helpers/fst/fastlz.c 2011-02-04 21:50:48.000000000 
+0100
+++ new/gtkwave-3.3.58/src/helpers/fst/fastlz.c 2014-03-04 00:58:44.000000000 
+0100
@@ -215,7 +215,7 @@
     if(ip[0] == ip[-1] && FASTLZ_READU16(ip-1)==FASTLZ_READU16(ip+1))
     {
       distance = 1;
-      ip += 3;
+      /* ip += 3; */ /* scan-build, never used */
       ref = anchor - 1 + 3;
       goto match;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/helpers/fst/fstapi.c 
new/gtkwave-3.3.58/src/helpers/fst/fstapi.c
--- old/gtkwave-3.3.57/src/helpers/fst/fstapi.c 2014-02-13 01:25:46.000000000 
+0100
+++ new/gtkwave-3.3.58/src/helpers/fst/fstapi.c 2014-03-18 23:26:22.000000000 
+0100
@@ -121,6 +121,7 @@
 
 #if defined(__APPLE__) && defined(__MACH__)
 #define FST_MACOSX 
+#include <sys/sysctl.h>
 #endif
 
 
@@ -918,14 +919,10 @@
 static void fstDetermineBreakSize(struct fstWriterContext *xc)
 {
 #if defined(__linux__) || defined(FST_MACOSX)
+int was_set = 0;
 
 #ifdef __linux__
 FILE *f = fopen("/proc/meminfo", "rb");
-#else
-FILE *f = popen("system_profiler", "r");
-#endif
-
-int was_set = 0;
 
 if(f)
        {
@@ -937,18 +934,10 @@
                s = fgets(buf, 256, f);
                if(s && *s)
                        {
-#ifdef __linux__
                        if(!strncmp(s, "MemTotal:", 9))
                                {
                                size_t v = atol(s+10);
                                v *= 1024; /* convert to bytes */
-#else
-                       if((s=strstr(s, "Memory:")))
-                               {
-                               size_t v = atol(s+7);
-                               v <<= 30; /* convert GB to bytes */
-#endif
-
                                v /= 8; /* chop down to 1/8 physical memory */
                                if(v > FST_BREAK_SIZE)
                                        {
@@ -965,18 +954,45 @@
                        }
                }
 
-#ifdef __linux__
        fclose(f);
-#else
-       pclose(f);
-#endif
        } 
 
 if(!was_set)
-#endif
        {
        xc->fst_huge_break_size = FST_BREAK_SIZE;
        }
+#else
+int mib[2];
+int64_t v;
+size_t length;
+
+mib[0] = CTL_HW;
+mib[1] = HW_MEMSIZE;
+length = sizeof(int64_t);
+if(!sysctl(mib, 2, &v, &length, NULL, 0))
+       {
+       v /= 8;
+
+       if(v > FST_BREAK_SIZE)
+               {
+               if(v > FST_BREAK_SIZE_MAX)
+                       {
+                       v = FST_BREAK_SIZE_MAX;
+                       }
+
+               xc->fst_huge_break_size = v;
+               was_set = 1;
+               }
+       }
+
+if(!was_set)
+       {
+       xc->fst_huge_break_size = FST_BREAK_SIZE;
+       }
+#endif
+#else
+xc->fst_huge_break_size = FST_BREAK_SIZE;
+#endif
 
 xc->fst_break_size = xc->fst_orig_break_size = FST_BREAK_SIZE;
 xc->fst_break_add_size = xc->fst_orig_break_add_size = FST_BREAK_ADD_SIZE;
@@ -3012,14 +3028,14 @@
                else
                {
                fstWritex(xc, NULL, 0);
-               write(xc->writex_fd, s, len);
+               if (write(xc->writex_fd, s, len)) { };
                }
        }
        else
        {
        if(xc->writex_pos)
                {
-               write(xc->writex_fd, xc->writex_buf, xc->writex_pos);
+               if(write(xc->writex_fd, xc->writex_buf, xc->writex_pos)) { };
                xc->writex_pos = 0;
                }
        }
@@ -3434,21 +3450,13 @@
 static void fstVcdID(char *buf, unsigned int value)
 {
 char *pnt = buf;
-unsigned int vmod;
 
 /* zero is illegal for a value...it is assumed they start at one */
-for(;;)
+while (value)
         {
-        if((vmod = (value % 94)))
-                {
-                *(pnt++) = (char)(vmod + 32);
-                } 
-                else
-                {
-                *(pnt++) = '~'; value -= 94;
-                }
+        value--;
+        *(pnt++) = (char)('!' + value % 94);
         value = value / 94;
-        if(!value) { break; }
         }
 
 *pnt = 0;
@@ -3460,18 +3468,11 @@
 unsigned int vmod;
 
 /* zero is illegal for a value...it is assumed they start at one */
-for(;;)
+while (value)
         {
-        if((vmod = (value % 94)))
-                {
-                *(pnt++) = (char)(vmod + 32);
-                } 
-                else
-                {
-                *(pnt++) = '~'; value -= 94;
-                }
+        value--;
+        *(pnt++) = (char)('!' + value % 94);
         value = value / 94;
-        if(!value) { break; }
         }
 
 return(pnt - buf);
@@ -3489,7 +3490,7 @@
        unsigned char *mem = malloc(FST_GZIO_LEN);
        off_t hl, uclen;
        off_t clen = 0;
-       gzFile zhandle;
+       gzFile zhandle = NULL;
        int zfd;
        int htyp = FST_BL_SKIP;
 
@@ -3826,6 +3827,7 @@
 int num_signal_dyn = 65536;
 int attrtype, subtype;
 uint64_t attrarg;
+fstHandle maxhandle_scanbuild;
 
 if(!xc) return(0);
 
@@ -3889,7 +3891,7 @@
        if(fv) fprintf(fv, "$timescale\n\t%d%ss\n$end\n", time_scale, 
time_dimension);
        }
 
-xc->maxhandle = 0;
+xc->maxhandle = 0; 
 xc->num_alias = 0;
 
 free(xc->signal_lens);
@@ -4075,11 +4077,13 @@
        }
 if(fv) fprintf(fv, "$enddefinitions $end\n");
 
-xc->signal_lens = realloc(xc->signal_lens, xc->maxhandle*sizeof(uint32_t));
-xc->signal_typs = realloc(xc->signal_typs, xc->maxhandle*sizeof(unsigned 
char));
+maxhandle_scanbuild = xc->maxhandle ? xc->maxhandle : 1; /*scan-build warning 
suppression, in reality we have at least one signal */
+
+xc->signal_lens = realloc(xc->signal_lens, 
maxhandle_scanbuild*sizeof(uint32_t));
+xc->signal_typs = realloc(xc->signal_typs, maxhandle_scanbuild*sizeof(unsigned 
char));
 
 free(xc->process_mask);
-xc->process_mask = calloc(1, (xc->maxhandle+7)/8);
+xc->process_mask = calloc(1, (maxhandle_scanbuild+7)/8);
 
 free(xc->temp_signal_value_buf);
 xc->temp_signal_value_buf = malloc(xc->longest_signal_value_len + 1);
@@ -4698,7 +4702,7 @@
                tpnt += skiplen;        
                }
 
-       tc_head = calloc(tsec_nitems, sizeof(uint32_t));
+       tc_head = calloc(tsec_nitems /* scan-build */ ? tsec_nitems : 1, 
sizeof(uint32_t));
        free(ucdata);
        }
 
@@ -5476,22 +5480,20 @@
 block_err:
        free(tc_head);
        free(chain_cmem);
-       free(mem_for_traversal);
+       free(mem_for_traversal); mem_for_traversal = NULL;
 
        secnum++;
        if(secnum == xc->vc_section_count) break; /* in case file is growing, 
keep with original block count */
        blkpos += seclen;
        }
 
+if(mem_for_traversal) free(mem_for_traversal); /* scan-build */
 free(length_remaining);
 free(headptr);
 free(scatterptr);
 
-if(chain_table)
-       {
-       free(chain_table);
-       free(chain_table_lengths);
-       }
+if(chain_table) free(chain_table);
+if(chain_table_lengths)        free(chain_table_lengths);
 
 free(time_table);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/helpers/fstminer.c 
new/gtkwave-3.3.58/src/helpers/fstminer.c
--- old/gtkwave-3.3.57/src/helpers/fstminer.c   2012-07-06 19:50:57.000000000 
+0200
+++ new/gtkwave-3.3.58/src/helpers/fstminer.c   2014-03-01 23:50:23.000000000 
+0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012 Tony Bybell.
+ * Copyright (c) 2012-2014 Tony Bybell.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -130,7 +130,7 @@
        {
        if(!killed_list[pnt_facidx])
                {
-               if((!match) || (strstr((const char *)pnt_value, match)))
+               if((!match) || (pnt_value /* scan-build */ && (strstr((const 
char *)pnt_value, match))))
                        {
                        char *fn;
                        fn = get_facname(lt, pnt_facidx);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/helpers/lxt2vcd.c 
new/gtkwave-3.3.58/src/helpers/lxt2vcd.c
--- old/gtkwave-3.3.57/src/helpers/lxt2vcd.c    2014-02-05 21:40:13.000000000 
+0100
+++ new/gtkwave-3.3.58/src/helpers/lxt2vcd.c    2014-02-28 23:14:07.000000000 
+0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003-9 Tony Bybell.
+ * Copyright (c) 2003-2014 Tony Bybell.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -48,21 +48,14 @@
 {
 static char buf[16];
 char *pnt = buf;
-unsigned int vmod;
 
 value++;
-for(;;)
+/* zero is illegal for a value...it is assumed they start at one */
+while (value)
         {
-        if((vmod = (value % 94)))
-                {
-                *(pnt++) = (char)(vmod + 32);
-                }   
-                else
-                {
-                *(pnt++) = '~'; value -= 94;
-                }
-        value = value / 94;  
-        if(!value) { break; }
+        value--;
+        *(pnt++) = (char)('!' + value % 94);
+        value = value / 94;
         }
 
 *pnt = 0;   
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/helpers/vcd2fst.c 
new/gtkwave-3.3.58/src/helpers/vcd2fst.c
--- old/gtkwave-3.3.57/src/helpers/vcd2fst.c    2014-01-25 21:23:16.000000000 
+0100
+++ new/gtkwave-3.3.58/src/helpers/vcd2fst.c    2014-02-18 00:46:26.000000000 
+0100
@@ -424,11 +424,13 @@
 int parallel_mode = 0; /* 0 is is single threaded, 1 is multi-threaded */
 
 
+#ifdef VCD2FST_EXTLOADERS_CONV
 static int suffix_check(const char *s, const char *sfx)
 {
 int sfxlen = strlen(sfx);
 return((strlen(s)>=sfxlen)&&(!strcasecmp(s+strlen(s)-sfxlen,sfx)));
 }
+#endif
 
 
 int fst_main(char *vname, char *fstname)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/helpers/vcd2lxt.c 
new/gtkwave-3.3.58/src/helpers/vcd2lxt.c
--- old/gtkwave-3.3.57/src/helpers/vcd2lxt.c    2012-02-27 08:50:25.000000000 
+0100
+++ new/gtkwave-3.3.58/src/helpers/vcd2lxt.c    2014-03-01 23:50:23.000000000 
+0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001-2010 Tony Bybell.
+ * Copyright (c) 2001-2014 Tony Bybell.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -239,6 +239,8 @@
  */
 static void alias_vs_normal_symadd(struct vcdsymbol *v, struct vcdsymbol 
*root_v)
 {
+if(!v) return; /* scan-build : should never happen */
+
 if(!root_v) 
        {
        if((v->vartype==V_INTEGER)||(v->vartype==V_REAL))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/helpers/vcd2lxt2.c 
new/gtkwave-3.3.58/src/helpers/vcd2lxt2.c
--- old/gtkwave-3.3.57/src/helpers/vcd2lxt2.c   2013-11-17 03:27:50.000000000 
+0100
+++ new/gtkwave-3.3.58/src/helpers/vcd2lxt2.c   2014-03-01 23:50:23.000000000 
+0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001-2010 Tony Bybell.
+ * Copyright (c) 2001-2014 Tony Bybell.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -245,6 +245,8 @@
  */
 static void alias_vs_normal_symadd(struct vcdsymbol *v, struct vcdsymbol 
*root_v)
 {
+if(!v) return; /* scan-build : should never happen */
+
 if(!root_v) 
        {
        if((v->vartype==V_INTEGER)||(v->vartype==V_REAL))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/helpers/vcd2vzt.c 
new/gtkwave-3.3.58/src/helpers/vcd2vzt.c
--- old/gtkwave-3.3.57/src/helpers/vcd2vzt.c    2013-11-17 03:27:50.000000000 
+0100
+++ new/gtkwave-3.3.58/src/helpers/vcd2vzt.c    2014-03-01 23:50:23.000000000 
+0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999-2010 Tony Bybell.
+ * Copyright (c) 1999-2014 Tony Bybell.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -247,6 +247,8 @@
  */
 static void alias_vs_normal_symadd(struct vcdsymbol *v, struct vcdsymbol 
*root_v)
 {
+if(!v) return; /* scan-build : should never happen */
+
 if(!root_v) 
        {
        if((v->vartype==V_INTEGER)||(v->vartype==V_REAL))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/helpers/vzt2vcd.c 
new/gtkwave-3.3.58/src/helpers/vzt2vcd.c
--- old/gtkwave-3.3.57/src/helpers/vzt2vcd.c    2014-02-05 21:40:13.000000000 
+0100
+++ new/gtkwave-3.3.58/src/helpers/vzt2vcd.c    2014-02-28 23:14:07.000000000 
+0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003-2009 Tony Bybell.
+ * Copyright (c) 2003-2014 Tony Bybell.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -48,21 +48,14 @@
 {
 static char buf[16];
 char *pnt = buf;
-unsigned int vmod;
 
 value++;
-for(;;)
+/* zero is illegal for a value...it is assumed they start at one */
+while (value)
         {
-        if((vmod = (value % 94)))
-                {
-                *(pnt++) = (char)(vmod + 32);
-                }   
-                else
-                {
-                *(pnt++) = '~'; value -= 94;
-                }
-        value = value / 94;  
-        if(!value) { break; }
+        value--;
+        *(pnt++) = (char)('!' + value % 94);
+        value = value / 94;
         }
 
 *pnt = 0;   
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/helpers/vzt_read.c 
new/gtkwave-3.3.58/src/helpers/vzt_read.c
--- old/gtkwave-3.3.57/src/helpers/vzt_read.c   2014-01-03 05:17:31.000000000 
+0100
+++ new/gtkwave-3.3.58/src/helpers/vzt_read.c   2014-03-01 23:50:23.000000000 
+0100
@@ -817,7 +817,7 @@
 vzt_rd_block_vch_decode(lt, b);
 vzt_rd_pthread_mutex_lock(lt, &b->mutex);
 
-autosort = calloc(b->num_time_ticks, sizeof(struct vzt_ncycle_autosort));
+autosort = calloc(b->num_time_ticks, sizeof(struct vzt_ncycle_autosort *));
 for(i=0;i<b->num_time_ticks;i++) autosort[i]=NULL;
 deadlist=NULL;
 
@@ -2058,6 +2058,8 @@
                        }
                }
 
+       free(pbuff); /* scan-build */
+
        for(i=lt->numrealfacs;i<lt->numfacs;i++)
                {
                if(lt->flags[i] & VZT_RD_SYM_F_ALIAS)   /* not necessary, only 
for sanity */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/interp.c 
new/gtkwave-3.3.58/src/interp.c
--- old/gtkwave-3.3.57/src/interp.c     2011-05-30 04:19:08.000000000 +0200
+++ new/gtkwave-3.3.58/src/interp.c     2014-02-19 20:56:45.000000000 +0100
@@ -31,7 +31,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <strings.h>
+#include <string.h>
 #include <math.h>
 
 #ifndef HAVE_BZERO
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/main.c 
new/gtkwave-3.3.58/src/main.c
--- old/gtkwave-3.3.57/src/main.c       2013-12-15 18:57:52.000000000 +0100
+++ new/gtkwave-3.3.58/src/main.c       2014-03-01 23:50:23.000000000 +0100
@@ -470,7 +470,7 @@
        mainwindow_already_built = 0;
        tcl_interpreter_needs_making = 1;
 
-       GLOBALS->logfiles = calloc(1, sizeof(void **)); /* calloc is 
deliberate! */
+       GLOBALS->logfiles = calloc(1, sizeof(void *)); /* calloc is deliberate! 
*/
        }
        else
        {
@@ -2295,12 +2295,12 @@
        {
        GLOBALS->num_notebook_pages = 1;
        GLOBALS->this_context_page = 0;
-       GLOBALS->contexts = calloc(1, sizeof(struct Globals ***)); /* calloc is 
deliberate! */
-       *GLOBALS->contexts = calloc(1, sizeof(struct Globals **)); /* calloc is 
deliberate! */
+       GLOBALS->contexts = calloc(1, sizeof(struct Global **)); /* calloc is 
deliberate! */ /* scan-build */
+       *GLOBALS->contexts = calloc(1, sizeof(struct Global *)); /* calloc is 
deliberate! */ /* scan-build */
        (*GLOBALS->contexts)[0] = GLOBALS;
 
-       GLOBALS->dead_context = calloc(1, sizeof(struct Globals ***)); /* 
calloc is deliberate! */
-       *GLOBALS->dead_context = calloc(1, sizeof(struct Globals **)); /* 
calloc is deliberate! */
+       GLOBALS->dead_context = calloc(1, sizeof(struct Global **)); /* calloc 
is deliberate! */ /* scan-build */
+       *GLOBALS->dead_context = calloc(1, sizeof(struct Global *)); /* calloc 
is deliberate! */ /* scan-build */
        *(GLOBALS->dead_context)[0] = NULL;
 
        GLOBALS->notebook = gtk_notebook_new();
@@ -2318,7 +2318,7 @@
        GLOBALS->this_context_page = GLOBALS->num_notebook_pages;
        GLOBALS->num_notebook_pages++;
        GLOBALS->num_notebook_pages_cumulative++; /* this never decreases, acts 
as an incrementing flipper id for side tabs */
-       *GLOBALS->contexts = realloc(*GLOBALS->contexts, 
GLOBALS->num_notebook_pages * sizeof(struct Globals *)); /* realloc is 
deliberate! */
+       *GLOBALS->contexts = realloc(*GLOBALS->contexts, 
GLOBALS->num_notebook_pages * sizeof(struct Global *)); /* realloc is 
deliberate! */ /* scan-build */
        (*GLOBALS->contexts)[GLOBALS->this_context_page] = GLOBALS;
 
        for(ix=0;ix<GLOBALS->num_notebook_pages;ix++)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/menu.c 
new/gtkwave-3.3.58/src/menu.c
--- old/gtkwave-3.3.57/src/menu.c       2014-02-12 21:32:42.000000000 +0100
+++ new/gtkwave-3.3.58/src/menu.c       2014-03-04 00:59:31.000000000 +0100
@@ -1,5 +1,5 @@
 /* 
- * Copyright (c) Tony Bybell 1999-2013.
+ * Copyright (c) Tony Bybell 1999-2014.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -2908,8 +2908,7 @@
          t=t->t_next;
        }
 
-      b=(struct Bits *)calloc_2(1,sizeof(struct Bits)+(nodepnt-1)*
-                               sizeof(struct Node *));
+      b=(struct Bits *)calloc_2(1,sizeof(struct Bits)+(nodepnt)*sizeof(struct 
Node *));
 
       b->attribs = malloc_2(nodepnt * sizeof(struct BitAttributes));
       for(i=0;i<nodepnt;i++)   /* for up combine we need to reverse the 
attribs list! */
@@ -5795,6 +5794,42 @@
 }
 
 void
+menu_dataformat_popcnt_on(gpointer null_data, guint callback_action, GtkWidget 
*widget)
+{
+if(GLOBALS->helpbox_is_active)
+        {
+        help_text_bold("\n\nData Format-Popcnt-On");
+        help_text(
+                " will step through all highlighted traces and ensure that"
+                " bits and vectors with this qualifier will be displayed 
after"       
+                " going through a population (one's) count conversion.  This 
is a filter"
+                " which sits before other Data Format options such as hex, 
etc."
+        );
+        return;
+        }  
+
+dataformat( ~(TR_POPCNT), TR_POPCNT );
+}
+
+void
+menu_dataformat_popcnt_off(gpointer null_data, guint callback_action, 
GtkWidget *widget)
+{
+if(GLOBALS->helpbox_is_active)
+        {
+        help_text_bold("\n\nData Format-Popcnt-Off");
+        help_text(
+                " will step through all highlighted traces and ensure that"
+                " bits and vectors with this qualifier will be displayed with"
+                " normal encoding."
+        );
+        return;
+        }  
+
+dataformat( ~(TR_POPCNT), 0 );
+}
+
+//
+void
 menu_dataformat_invert_on(gpointer null_data, guint callback_action, GtkWidget 
*widget)
 {
 if(GLOBALS->helpbox_is_active)
@@ -6480,6 +6515,7 @@
                " F = File Filter\n"
                " P = Process Filter\n"
                " T = Transaction Filter\n"
+               " p = Population Count\n"
         );
         }
        else
@@ -6611,6 +6647,9 @@
     WAVE_GTKIFE("/Edit/Data Format/Gray Filters/To Gray", NULL, 
menu_dataformat_bingray_on, WV_MENU_B2G, "<Item>"),
     WAVE_GTKIFE("/Edit/Data Format/Gray Filters/From Gray", NULL, 
menu_dataformat_graybin_on, WV_MENU_G2B, "<Item>"),
     WAVE_GTKIFE("/Edit/Data Format/Gray Filters/None", NULL, 
menu_dataformat_nogray,    WV_MENU_GBNONE, "<Item>"),
+    WAVE_GTKIFE("/Edit/Data Format/Popcnt/On", NULL, 
menu_dataformat_popcnt_on, WV_MENU_POPON, "<Item>"),
+    WAVE_GTKIFE("/Edit/Data Format/Popcnt/Off", NULL, 
menu_dataformat_popcnt_off,    WV_MENU_POPOFF, "<Item>"),
+
     WAVE_GTKIFE("/Edit/Color Format/Normal", NULL, menu_colorformat_0,    
WV_MENU_CLRFMT0, "<Item>"),
     WAVE_GTKIFE("/Edit/Color Format/Red", NULL, menu_colorformat_1,    
WV_MENU_CLRFMT1, "<Item>"),
     WAVE_GTKIFE("/Edit/Color Format/Orange", NULL, menu_colorformat_2,    
WV_MENU_CLRFMT2, "<Item>"),
@@ -7274,6 +7313,9 @@
     WAVE_GTKIFE("/Data Format/Gray Filters/To Gray", NULL, 
menu_dataformat_bingray_on, WV_MENU_B2G, "<Item>"),
     WAVE_GTKIFE("/Data Format/Gray Filters/From Gray", NULL, 
menu_dataformat_graybin_on, WV_MENU_G2B, "<Item>"),
     WAVE_GTKIFE("/Data Format/Gray Filters/None", NULL, 
menu_dataformat_nogray,    WV_MENU_GBNONE, "<Item>"),
+    WAVE_GTKIFE("/Data Format/Popcnt/On", NULL, menu_dataformat_popcnt_on, 
WV_MENU_POPON, "<Item>"),
+    WAVE_GTKIFE("/Data Format/Popcnt/Off", NULL, menu_dataformat_popcnt_off,   
 WV_MENU_POPOFF, "<Item>"),
+
     WAVE_GTKIFE("/Color Format/Normal", NULL, menu_colorformat_0,    
WV_MENU_CLRFMT0, "<Item>"),
     WAVE_GTKIFE("/Color Format/Red", NULL, menu_colorformat_1,    
WV_MENU_CLRFMT1, "<Item>"),
     WAVE_GTKIFE("/Color Format/Orange", NULL, menu_colorformat_2,    
WV_MENU_CLRFMT2, "<Item>"),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/menu.h 
new/gtkwave-3.3.58/src/menu.h
--- old/gtkwave-3.3.57/src/menu.h       2013-10-18 23:42:35.000000000 +0200
+++ new/gtkwave-3.3.58/src/menu.h       2014-02-25 22:36:14.000000000 +0100
@@ -1,5 +1,5 @@
 /* 
- * Copyright (c) Tony Bybell 1999-2013.
+ * Copyright (c) Tony Bybell 1999-2014.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -160,6 +160,8 @@
 WV_MENU_B2G,
 WV_MENU_G2B,
 WV_MENU_GBNONE,
+WV_MENU_POPON,
+WV_MENU_POPOFF,
 WV_MENU_CLRFMT0,
 WV_MENU_CLRFMT1,
 WV_MENU_CLRFMT2,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/mouseover.c 
new/gtkwave-3.3.58/src/mouseover.c
--- old/gtkwave-3.3.57/src/mouseover.c  2013-09-16 18:58:24.000000000 +0200
+++ new/gtkwave-3.3.58/src/mouseover.c  2014-02-25 22:36:14.000000000 +0100
@@ -1,5 +1,5 @@
 /* 
- * Copyright (c) Tony Bybell 2006-2012.
+ * Copyright (c) Tony Bybell 2006-2014.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -82,7 +82,10 @@
 /* [13] */
 if((flags & TR_TTRANSLATED) != 0) { ch[pos++] = 'T'; }
 
-/* [14]  (at worst case this needs 14 characters) */
+/* [14] */
+if((flags & TR_POPCNT) != 0) { ch[pos++] = 'p'; }
+
+/* [15]  (at worst case this needs 16 characters) */
 ch[pos] = 0;
 
 return(pos);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/mouseover_sigs.c 
new/gtkwave-3.3.58/src/mouseover_sigs.c
--- old/gtkwave-3.3.57/src/mouseover_sigs.c     2012-03-26 17:53:41.000000000 
+0200
+++ new/gtkwave-3.3.58/src/mouseover_sigs.c     2014-02-25 22:36:14.000000000 
+0100
@@ -1,5 +1,5 @@
 /* 
- * Copyright (c) Tony Bybell 2006-2012.
+ * Copyright (c) Tony Bybell 2006-2014.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -109,7 +109,10 @@
 /* [13] */
 if((flags & TR_TTRANSLATED) != 0) { ch[pos++] = 'T'; }
 
-/* [14]  (at worst case this needs 14 characters) */
+/* [14] */
+if((flags & TR_POPCNT) != 0) { ch[pos++] = 'p'; }
+
+/* [15]  (at worst case this needs 16 characters) */
 ch[pos] = 0;
 
 if(!t->vector)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/tcl_helper.c 
new/gtkwave-3.3.58/src/tcl_helper.c
--- old/gtkwave-3.3.57/src/tcl_helper.c 2012-09-12 23:25:18.000000000 +0200
+++ new/gtkwave-3.3.58/src/tcl_helper.c 2014-03-04 00:59:31.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) Tony Bybell and Concept Engineering GmbH 2008-2012.
+ * Copyright (c) Tony Bybell and Concept Engineering GmbH 2008-2014.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -2654,11 +2654,11 @@
                {
                char *s = Tcl_GetString(objv[i]);
                int slen = strlen(s);
-               struct wave_script_args *w = wave_alloca(sizeof(struct 
wave_script_args) + slen);
+               struct wave_script_args *w = wave_alloca(sizeof(struct 
wave_script_args) + slen + 1);
                        /*  alloca used in case we context switch and get our 
allocator ripped out from under us -- the call stack won't go away */
                if(slen)
                        {
-                       strcpy(w->payload, s);
+                       strcpy(w->payload, s); /* scan-build complains but it 
thinks payload[1] is the actual memory allocated */
                        }
                w->curr = NULL; /* yes, curr is only ever used for the 1st 
struct, but there is no sense creating head/follower structs for this */
                w->next = NULL;
@@ -2681,7 +2681,7 @@
 
        if(!GLOBALS->wave_script_args) /* create a dummy list in order to keep 
requesters from popping up in file.c, etc. */
                {
-               GLOBALS->wave_script_args = wave_alloca(sizeof(struct 
wave_script_args));
+               GLOBALS->wave_script_args = wave_alloca(sizeof(struct 
wave_script_args) + 1);
                GLOBALS->wave_script_args->curr = NULL;
                GLOBALS->wave_script_args->next = NULL;
                GLOBALS->wave_script_args->payload[0] = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/translate.c 
new/gtkwave-3.3.58/src/translate.c
--- old/gtkwave-3.3.57/src/translate.c  2012-01-05 21:52:20.000000000 +0100
+++ new/gtkwave-3.3.58/src/translate.c  2014-03-01 23:50:23.000000000 +0100
@@ -1,5 +1,5 @@
 /* 
- * Copyright (c) Tony Bybell 2005-6.
+ * Copyright (c) Tony Bybell 2005-2014.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -352,7 +352,7 @@
 
 GLOBALS->num_file_filters++;
 load_file_filter(GLOBALS->num_file_filters, *GLOBALS->fileselbox_text);
-if(GLOBALS->xl_file_filter[GLOBALS->num_file_filters])
+if(GLOBALS->xl_file_filter[GLOBALS->num_file_filters] && 
(*GLOBALS->fileselbox_text /* scan-build */))
        {
        if(GLOBALS->filesel_filter[GLOBALS->num_file_filters]) 
free_2(GLOBALS->filesel_filter[GLOBALS->num_file_filters]);
        GLOBALS->filesel_filter[GLOBALS->num_file_filters] = 
malloc_2(strlen(*GLOBALS->fileselbox_text) + 1);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/tree.c 
new/gtkwave-3.3.58/src/tree.c
--- old/gtkwave-3.3.57/src/tree.c       2013-10-18 06:04:04.000000000 +0200
+++ new/gtkwave-3.3.58/src/tree.c       2014-03-04 00:59:31.000000000 +0100
@@ -176,7 +176,7 @@
                                return;
                                }
 
-                       t = talloc_2(sizeof(struct tree) + scopename_len);
+                       t = talloc_2(sizeof(struct tree) + scopename_len + 1);
                        *PPValue = t;
                        goto t_allocated;
                        }
@@ -219,14 +219,14 @@
 
                                strcpy(str+len, scopename);
                                PPValue = JudySLIns(&GLOBALS->sym_tree, 
(uint8_t *)str, PJE0);
-                               t = talloc_2(sizeof(struct tree) + 
scopename_len);
+                               t = talloc_2(sizeof(struct tree) + 
scopename_len + 1);
                                *PPValue = t;
                                goto t_allocated;
                                }
                        }
 #endif
 
-               t = talloc_2(sizeof(struct tree) + scopename_len);
+               t = talloc_2(sizeof(struct tree) + scopename_len + 1);
 #ifdef _WAVE_HAVE_JUDY
 t_allocated:
 #endif
@@ -256,7 +256,7 @@
                        t = t->next;
                        }
 
-               t = talloc_2(sizeof(struct tree) + scopename_len);
+               t = talloc_2(sizeof(struct tree) + scopename_len + 1);
                strcpy(t->name, scopename);
                t->kind = ttype;
                t->t_which = mtyp;
@@ -269,7 +269,7 @@
        }
        else
        {
-       t = talloc_2(sizeof(struct tree) + scopename_len);
+       t = talloc_2(sizeof(struct tree) + scopename_len + 1);
        strcpy(t->name, scopename);
        t->kind = ttype;
        t->t_which = mtyp;
@@ -796,7 +796,7 @@
 #ifdef _WAVE_HAVE_JUDY
 construct:
 #endif
-               nt=(struct tree *)talloc_2(sizeof(struct 
tree)+GLOBALS->module_len_tree_c_1);
+               nt=(struct tree *)talloc_2(sizeof(struct 
tree)+GLOBALS->module_len_tree_c_1 + 1);
                memcpy(nt->name, GLOBALS->module_tree_c_1, 
GLOBALS->module_len_tree_c_1);
 
                if(s)
@@ -836,7 +836,7 @@
                        {
                        s=get_module_name(s);
                
-                       nt=(struct tree *)talloc_2(sizeof(struct 
tree)+GLOBALS->module_len_tree_c_1);
+                       nt=(struct tree *)talloc_2(sizeof(struct 
tree)+GLOBALS->module_len_tree_c_1 + 1);
                        memcpy(nt->name, GLOBALS->module_tree_c_1, 
GLOBALS->module_len_tree_c_1);
 
                        if(s)
@@ -862,7 +862,7 @@
                {
                s=get_module_name(s);
 
-               nt=(struct tree *)talloc_2(sizeof(struct 
tree)+GLOBALS->module_len_tree_c_1);
+               nt=(struct tree *)talloc_2(sizeof(struct 
tree)+GLOBALS->module_len_tree_c_1 + 1);
                memcpy(nt->name, GLOBALS->module_tree_c_1, 
GLOBALS->module_len_tree_c_1);
 
                if(!s) nt->t_which=which; else nt->t_which = 
WAVE_T_WHICH_UNDEFINED_COMPNAME;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/tree.h 
new/gtkwave-3.3.58/src/tree.h
--- old/gtkwave-3.3.57/src/tree.h       2013-10-18 06:04:04.000000000 +0200
+++ new/gtkwave-3.3.58/src/tree.h       2014-03-04 00:59:31.000000000 +0100
@@ -118,7 +118,7 @@
 
 unsigned kind : 7;     /* Kind of the leaf: ghwlib reads this as val & 0x7f so 
only 7 bits needed */
 unsigned children_in_gui : 1; /* indicates that the child nodes are in the 
gtk2 tree, but gets borrowed during tree creation for fast judy sort */
-char name[1];
+char name[];           /* C99 */
 };
 
 #ifdef WAVE_USE_STRUCT_PACKING
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/treesearch_gtk2.c 
new/gtkwave-3.3.58/src/treesearch_gtk2.c
--- old/gtkwave-3.3.57/src/treesearch_gtk2.c    2014-02-12 22:14:16.000000000 
+0100
+++ new/gtkwave-3.3.58/src/treesearch_gtk2.c    2014-02-18 00:46:26.000000000 
+0100
@@ -82,7 +82,6 @@
 {
 char *s2 = s;
 int found = 0;
-int len;
 
 while(*s2)
        {
@@ -96,7 +95,6 @@
 
 if(found)
        {
-       len = strlen(s);
        s2 = strdup_2(s);
        if(do_free) free_2(s);
        s = s2;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/ttranslate.c 
new/gtkwave-3.3.58/src/ttranslate.c
--- old/gtkwave-3.3.57/src/ttranslate.c 2012-02-12 05:13:37.000000000 +0100
+++ new/gtkwave-3.3.58/src/ttranslate.c 2014-03-04 00:59:31.000000000 +0100
@@ -624,11 +624,11 @@
 
                        cvt_ok = 1;
 
-                       vt_head = vt_curr = vt = calloc_2(1, sizeof(struct 
VectorEnt));
+                       vt_head = vt_curr = vt = calloc_2(1, sizeof(struct 
VectorEnt) + 1);
                        vt->time = LLDescriptor(-2);
                        vprev = vt; /* for duplicate removal */
 
-                       vt_curr = vt_curr->next = vt = calloc_2(1, 
sizeof(struct VectorEnt));
+                       vt_curr = vt_curr->next = vt = calloc_2(1, 
sizeof(struct VectorEnt) + 1);
                        vt->time = LLDescriptor(-1);
 
                        for(;;)
@@ -694,7 +694,7 @@
                                                        } while(pnt != (sp-1));
                                                }
                                                
-                                       vt = calloc_2(1, sizeof(struct 
VectorEnt) + slen);
+                                       vt = calloc_2(1, sizeof(struct 
VectorEnt) + slen + 1);
                                        if(sp) strcpy((char *)vt->v, sp);
        
                                        if(tim > prev_tim) 
@@ -795,15 +795,15 @@
                                        }
                                }
        
-                       vt_curr = vt_curr->next = vt = calloc_2(1, 
sizeof(struct VectorEnt));
+                       vt_curr = vt_curr->next = vt = calloc_2(1, 
sizeof(struct VectorEnt) + 1);
                        vt->time = MAX_HISTENT_TIME - 1;
                        regions++;
        
-                       /* vt_curr = */ vt_curr->next = vt = calloc_2(1, 
sizeof(struct VectorEnt)); /* scan-build */
+                       /* vt_curr = */ vt_curr->next = vt = calloc_2(1, 
sizeof(struct VectorEnt) + 1); /* scan-build */
                        vt->time = MAX_HISTENT_TIME;
                        regions++;
        
-                       bv = calloc_2(1, sizeof(struct BitVector) + 
(sizeof(vptr) * (regions-1)));
+                       bv = calloc_2(1, sizeof(struct BitVector) + 
(sizeof(vptr) * (regions)));
                        bv->bvname = strdup_2(trace_name ? trace_name : 
orig_name);
                        bv->nbits = 1;
                        bv->numregions = regions;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gtkwave-3.3.57/src/vlist.c 
new/gtkwave-3.3.58/src/vlist.c
--- old/gtkwave-3.3.57/src/vlist.c      2014-02-13 20:53:53.000000000 +0100
+++ new/gtkwave-3.3.58/src/vlist.c      2014-02-16 07:57:10.000000000 +0100
@@ -247,7 +247,7 @@
        int rc;
        
        rc = compress2((unsigned char *)dmem, &destlen, (unsigned char *)(v+1), 
v->siz, GLOBALS->vlist_compression_depth);
-       if((rc == Z_OK)&&(destlen < (v->siz - sizeof(long))))
+       if( (rc == Z_OK) && ((destlen + sizeof(int)) < v->siz) )
                {
                /* printf("siz: %d, dest: %d rc: %d\n", v->siz, (int)destlen, 
rc); */
 

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to