Remove compiler warning about unused variable
authorDan Scott <dscott@laurentian.ca>
Thu, 30 Aug 2012 04:12:33 +0000 (00:12 -0400)
committerDan Scott <dscott@laurentian.ca>
Thu, 30 Aug 2012 04:12:33 +0000 (00:12 -0400)
Newer versions of GCC were issuing the following warning:

oils_sql.c: In function 'oilsMakeJSONFromResult':
oils_sql.c:6469:6: warning: variable 'fmIndex' set but not used
[-Wunused-but-set-variable]

And indeed, the variable is not used within this function - so delete
it.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/c-apps/oils_sql.c

index c9c1618..5bc76b1 100644 (file)
@@ -6466,7 +6466,6 @@ static jsonObject* oilsMakeJSONFromResult( dbi_result result ) {
        char dt_string[ 256 ];
        struct tm gmdt;
 
-       int fmIndex;
        int columnIndex = 1;
        int attr;
        unsigned short type;
@@ -6477,8 +6476,6 @@ static jsonObject* oilsMakeJSONFromResult( dbi_result result ) {
 
                osrfLogInternal( OSRF_LOG_MARK, "Looking for column named [%s]...", (char*) columnName );
 
-               fmIndex = -1; // reset the position
-
                /* determine the field type and storage attributes */
                type = dbi_result_get_field_type_idx( result, columnIndex );
                attr = dbi_result_get_field_attribs_idx( result, columnIndex );