Coverity fix.
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 Mar 2011 14:44:22 +0000 (14:44 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 Mar 2011 14:44:22 +0000 (14:44 +0000)
RAW/dateStream.cxx

index 2dbd84f..a499485 100644 (file)
@@ -767,7 +767,8 @@ void parseGdc( char * const line ) {
                 lineNmb );
        exit( 1 );
       }
-      if ( sscanf( idNum, "%d", (int*)&currGdcId ) != 1 ) {
+      int inCurrGdcId;
+      if ( sscanf( idNum, "%d", &inCurrGdcId ) != 1 ) {
        fprintf( stderr,
                 "%s: line:%d GDC declaration, numeric ID needed (%s)",
                 myName,
@@ -775,6 +776,7 @@ void parseGdc( char * const line ) {
                 idNum );
        exit( 1 );
       }
+      currGdcId = (eventGdcIdType)inCurrGdcId;
       DBG_VERBOSE printf( "%d)     GDC - ID:%d\n",
                          lineNmb,
                          currGdcId );