Ticket #405 (new defect)

Opened 8 years ago

wrong parser called in src/seismic_processing/carlsubtrig/readcnfg.c

Reported by: baker Owned by: somebody
Priority: minor Milestone: All Platforms
Component: carlsubtrig Version: 7.8
Keywords: Cc:

Description

readcnfg.c parses ListSubnets? and AllSubnets? as doubles instead of as ints:

icc -c -D_BSD_SOURCE -m32 -Dlinux -D__i386 -D_LINUX -D_INTEL -D_USE_SCHED  -D_USE_PTHREADS -D_USE_TERMIOS -I/opt/earthworm/earthworm-7.6-5880/include -no-gcc -g -O0 -Wcheck -Wformat -check=stack,uninit -traceback -g readcnfg.c

readcnfg.c(375): warning #2259: non-pointer conversion from "double" to "int" may lose significant bits
            csuNet->listSubnets = k_val( );
                                ^

readcnfg.c(382): warning #2259: non-pointer conversion from "double" to "int" may lose significant bits
            csuNet->numSubAll = k_val( );
                              ^

Here's the fix:

--- src/seismic_processing/carlsubtrig/readcnfg.c
+++ src/seismic_processing/carlsubtrig/readcnfg.c       
@@ -374,3 +374,3 @@
           /* Read the list-subnets value */
-          csuNet->listSubnets = k_val( );
+          csuNet->listSubnets = k_int( );
           params[16] = 1;
@@ -381,3 +381,3 @@
           /* Read the numSubAll value */
-          csuNet->numSubAll = k_val( );
+          csuNet->numSubAll = k_int( );
           params[17] = 1;
Note: See TracTickets for help on using tickets.