@@ -81,7 +81,7 @@ void parseVcdInstruction(ParseCtx* p) {
8181 if (!strcmp ("var" , token )) {
8282 Token id ;
8383 Channel c = {.scope = p -> scope_cur , .samples = malloc (sizeof (Sample ))};
84- scanf (" %*s %d %" TXT (SFL ) "[^ ] %" TXT (SFL ) "[^$]" , & c .size , id , c .name );
84+ scanf (" %*s %u %" TXT (SFL ) "[^ ] %" TXT (SFL ) "[^$]" , & c .size , id , c .name );
8585 p -> ch_lim = MAX (p -> ch_lim , strlen (c .name ));
8686 p -> sz_lim = MAX (p -> sz_lim , c .size );
8787 p -> ch [chanId (id , p -> chan_str )] = c ;
@@ -191,7 +191,7 @@ void printYml(ParseCtx* p, PrintOpt* opt) {
191191 printf ("%-*g " , ITV_TIME * zoom - 1 , smpl * p -> scale );
192192 }
193193 printf ("%s\nchannels:\n" , opt -> end );
194- for (Channel * ch = p -> ch ; ch - p -> ch < COUNT (p -> ch ); ch ++ ) {
194+ for (Channel * ch = p -> ch ; ch - p -> ch < ( signed ) COUNT (p -> ch ); ch ++ ) {
195195 // skip empty ch
196196 if (!ch -> size ) continue ;
197197 // print scope (if changed)
@@ -220,13 +220,13 @@ void printYml(ParseCtx* p, PrintOpt* opt) {
220220 }
221221}
222222
223- int main (int argc , char * * argv ) {
223+ int main () {
224224 PrintOpt opt = {getenv ("LOW" ) ?: "▁" , getenv ("RAISE" ) ?: "╱" ,
225225 getenv ("HIGH" ) ?: "▔" , getenv ("DROWN" ) ?: "╲" ,
226226 getenv ("STX" ) ?: "\"" , getenv ("ETX" ) ?: "\"" ,
227227 atoi (getenv ("SKIP" ) ?: "0" )};
228228 // PrintOpt opt = {"_", "/", "#", "\\"} {"▁", "╱", "▔", "╲"};
229- ParseCtx ctx = {};
229+ ParseCtx ctx = {0 };
230230 parseVcd (& ctx );
231231 printYml (& ctx , & opt );
232232 return 0 ;
0 commit comments