act_comm.c
-----------
act_comm.c: In function ‘drunk_speech’:
act_comm.c:212:10: warning: array subscript has type ‘char’
find
if( toupper( *arg ) == 'S' )
change it to
if( toupper( (int)*arg ) == 'S' )
act_comm.c: In function ‘drunk_speech’:
act_comm.c:227:10: warning: array subscript has type ‘char’
find
if( toupper( *arg ) == 'R' )
change it to
if( toupper( (int)*arg ) == 'R' )
act_comm.c: In function ‘drunk_speech’:
act_comm.c:237:7: warning: array subscript has type ‘char’
find
if( toupper( *arg ) == 'T' )
change it to
if( toupper( (int)*arg ) == 'T' )
act_comm.c: In function ‘drunk_speech’:
act_comm.c:247:7: warning: array subscript has type ‘char’
find
else if( toupper( *arg ) == 'X' )
change it to
else if( toupper( (int)*arg ) == 'X' )
act_comm.c: In function ‘drunk_speech’:
act_comm.c:278:10: warning: array subscript has type ‘char’
act_comm.c:279:13: warning: array subscript has type ‘char’
act_comm.c:280:10: warning: array subscript has type ‘char’
act_comm.c:281:13: warning: array subscript has type ‘char’
find
if( isupper( *txt ) )
*txt1 = tolower( *txt );
else if( islower( *txt ) )
*txt1 = toupper( *txt );
change it to
if( isupper( (int)*txt ) )
*txt1 = tolower( (int)*txt );
else if( islower( (int)*txt ) )
*txt1 = toupper( (int)*txt );
act_comm.c: In function ‘do_emote’:
act_comm.c:779:4: warning: array subscript has type ‘char’
find
if( isalpha( plast[-1] ) )
change it to
if( isalpha( (int)plast[-1] ) )
act_comm.c: In function ‘do_channels’:
act_comm.c:1831:11: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( !arg2 || arg2[0] == '\0' )
change it to
if( arg2 == NULL || arg2[0] == '\0' )
act_comm.c: In function ‘do_chat’:
act_comm.c:2404:11: warning: the address of ‘buf’ will always evaluate as ‘true’
find
if( buf )
change it to
if( buf != NULL )
act_info.c
-----------
act_info.c: In function ‘show_visible_affects_to_char’:
act_info.c:472:4: warning: array subscript has type ‘char’
find
name[0] = toupper( name[0] );
change it to
name[0] = toupper( (int)name[0] );
act_info.c: In function ‘get_help’:
act_info.c:2147:4: warning: array subscript has type ‘char’
find
if( isdigit( argument[0] ) )
change it to
if( isdigit( (int)argument[0] ) )
act_info.c: In function ‘do_set_book’:
act_info.c:3473:8: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( arg2 && arg2[0] != '\0' )
change it to
if( arg2 != NULL && arg2[0] != '\0' )
act_info.c: In function ‘do_set_help’:
act_info.c:3767:11: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( arg2 && arg2[0] != '\0' )
change it to
if( arg2 != NULL && arg2[0] != '\0' )
act_info.c: In function ‘do_set_help’:
act_info.c:3805:8: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( arg2 && arg2[0] != '\0' )
change it to
if( arg2 != NULL && arg2[0] != '\0' )
act_move.c
-------------
act_move.c: In function ‘grab_word’:
act_move.c:157:4: warning: array subscript has type ‘char’
find
while( isspace( *argument ) )
change it to
while( isspace( (int)*argument ) )
act_move.c: In function ‘grab_word’:
act_move.c:175:4: warning: array subscript has type ‘char’
find
while( isspace( *argument ) )
change it to
while( isspace( (int)*argument ) )
act_wiz.c
--------------
act_wiz.c: In function ‘do_permit’:
act_wiz.c:126:8: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( !arg2 || arg2[0] == '\0' )
change it to
if( arg2 == NULL|| arg2[0] == '\0' )
act_wiz.c: In function ‘do_invis’:
act_wiz.c:3283:8: warning: the address of ‘arg’ will always evaluate as ‘true’
find
if( arg && arg[0] != '\0' )
change it to
if( arg != NULL && arg[0] != '\0' )
act_wiz.c: In function ‘do_loadup’:
act_wiz.c:3602:4: warning: array subscript has type ‘char’
find
sprintf( fname, "%s%c/%s", PLAYER_DIR, tolower( name[0] ), capitalize( name ) );
change it to
sprintf( fname, "%s%c/%s", PLAYER_DIR, tolower( (int)name[0] ), capitalize( name ) );
act_wiz.c: In function ‘do_destroy’:
act_wiz.c:4227:4: warning: array subscript has type ‘char’
act_wiz.c:4228:4: warning: array subscript has type ‘char’
find
sprintf( buf, "%s%c/%s", PLAYER_DIR, tolower( arg[0] ), name );
sprintf( buf2, "%s%c/%s", BACKUP_DIR, tolower( arg[0] ), name );
change it to
sprintf( buf, "%s%c/%s", PLAYER_DIR, tolower( (int)arg[0] ), name );
sprintf( buf2, "%s%c/%s", BACKUP_DIR, tolower( (int)arg[0] ), name );
act_wiz.c: In function ‘do_pcrename’:
act_wiz.c:5934:4: warning: array subscript has type ‘char’
act_wiz.c:5935:4: warning: array subscript has type ‘char’
act_wiz.c:5936:4: warning: array subscript has type ‘char’
find
sprintf( newname, "%s%c/%s", PLAYER_DIR, tolower( arg2[0] ), capitalize( arg2 ) );
sprintf( oldname, "%s%c/%s", PLAYER_DIR, tolower( victim->pcdata->filename[0] ), capitalize( victim->pcdata->filename ) );
sprintf( backname, "%s%c/%s", BACKUP_DIR, tolower( victim->pcdata->filename[0] ),
capitalize( victim->pcdata->filename ) );
change it to
sprintf( newname, "%s%c/%s", PLAYER_DIR, tolower( (int)arg2[0] ), capitalize( arg2 ) );
sprintf( oldname, "%s%c/%s", PLAYER_DIR, tolower( (int)victim->pcdata->filename[0] ), capitalize( victim->pcdata->filename ) );
sprintf( backname, "%s%c/%s", BACKUP_DIR, tolower( (int)victim->pcdata->filename[0] ),
capitalize( victim->pcdata->filename ) );
arena.c
-----------
arena.c: In function ‘arena_update’:
arena.c:1470:66: warning: operation on ‘member’ may be undefined
find
for( member = arena->first_member; member; member = member = winner )
change it to
for( member = arena->first_member; member; member = winner )
arena.c: In function ‘do_arena’:
arena.c:3108:5: warning: the address of ‘arg3’ will always evaluate as ‘true’
find
[code]
if( arg3 && arg3 != NULL )
change it to
if( arg3 != NULL && arg3 != NULL )
arena.c:3333:5: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( arg2 )
change it to
if( arg2 != NULL )
build.c
----------
build.c: In function ‘copy_buffer’:
build.c:793:11: warning: the address of ‘tmp’ will always evaluate as ‘true’
find
if( tmp && tmp[len - 1] == '~' )
change it to
if( tmp != NULL && tmp[len - 1] == '~' )
build.c: In function ‘do_mset’:
build.c:1584:11: warning: the address of ‘arg3’ will always evaluate as ‘true’
find
if( !arg3 || arg3[0] == '\0' )
change it to
if( arg3 == NULL || arg3[0] == '\0' )
build.c: In function ‘do_oset’:
build.c:2710:11: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( !arg2 || arg2[0] == '\0' || !argument || argument[0] == 0 )
change it to
if( arg2 == NULL || arg2[0] == '\0' || !argument || argument[0] == 0 )
build.c: In function ‘do_oset’:
build.c:2830:11: warning: the address of ‘arg3’ will always evaluate as ‘true’
find
if( !arg3 || arg3[0] == '\0' )
change it to
if( arg3 == NULL || arg3[0] == '\0' )
build.c: In function ‘do_oset’:
build.c:2867:11: warning: the address of ‘arg3’ will always evaluate as ‘true’
find
if( !arg3 || arg3[0] == '\0' )
change it to
if( arg3 == NULL || arg3[0] == '\0' )
build.c: In function ‘do_matshop’:
build.c:3135:11: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( arg2 )
change it to
if( arg2 != NULL )
build.c: In function ‘do_material’:
build.c:3517:14: warning: the address of ‘arg4’ will always evaluate as ‘true’
find
if( !arg4 || arg4[0] == '\0' || !argument || argument[0] == 0 )
change it to
if( arg4 == NULL || arg4[0] == '\0' || !argument || argument[0] == 0 )
build.c: In function ‘do_ingredient’:
build.c:3765:11: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( arg2 && !str_cmp( arg2, "name" ) )
change it to
if( arg2 != NULL && !str_cmp( arg2, "name" ) )
build.c: In function ‘do_ingredient’:
build.c:3825:11: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( arg2 )
change it to
if( arg2 != NULL )
build.c: In function ‘do_recipe’:
build.c:4000:11: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( arg2 && !str_cmp( arg2, "name" ) )
change it to
if( arg2 != NULL && !str_cmp( arg2, "name" ) )
build.c: In function ‘do_recipe’:
build.c:4038:11: warning: the address of ‘arg3’ will always evaluate as ‘true’
find
if( arg3 && !str_cmp( arg3, "name" ) )
change it to
if( arg3 != NULL && !str_cmp( arg3, "name" ) )
build.c: In function ‘do_moon’:
build.c:4336:11: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( arg2 )
change it to
if( arg2 != NULL )
build.c: In function ‘do_species’:
build.c:4575:11: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( arg2 )
change it to
if( arg2 != NULL )
build.c: In function ‘do_nation’:
build.c:4804:11: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( arg2 )
change it to
if( arg2 != NULL )
build.c: In function ‘do_redit’:
build.c:5805:11: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( !arg2 || arg2[0] == '\0' || !argument || argument[0] == 0 )
change it to
if( arg2 == NULL || arg2[0] == '\0' || !argument || argument[0] == 0 )
build.c: In function ‘do_redit’:
build.c:6264:11: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( !arg2 || arg2[0] == '\0' )
change it to
if( arg2 == NULL || arg2[0] == '\0' )
build.c: In function ‘do_redit’:
build.c:6285:11: warning: the address of ‘arg3’ will always evaluate as ‘true’
find
if( !arg3 || arg3[0] == '\0' )
change it to
if( arg3 == NULL || arg3[0] == '\0' )
build.c: In function ‘do_redit’:
build.c:6350:11: warning: the address of ‘arg3’ will always evaluate as ‘true’
find
if( arg3 && arg3[0] != '\0' )
change it to
if( arg3 != NULL && arg3[0] != '\0' )
build.c: In function ‘do_redit’:
build.c:6386:11: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( !arg2 || arg2[0] == '\0' )
change it to
if( arg2 == NULL || arg2[0] == '\0' )
build.c: In function ‘do_redit’:
build.c:6457:11: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( !arg2 || arg2[0] == '\0' )
change it to
if( arg2 == NULL || arg2[0] == '\0' )
build.c: In function ‘do_redit’:
build.c:6491:11: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( !arg2 || arg2[0] == '\0' )
change it to
if( arg2 == NULL || arg2[0] == '\0' )
build.c: In function ‘do_redit’:
build.c:6520:11: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( !arg2 || arg2[0] == '\0' )
change it to
if( arg2 == NULL || arg2[0] == '\0' )
build.c: In function ‘do_redit’:
build.c:6549:11: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( !arg2 || arg2[0] == '\0' )
change it to
if( arg2 == NULL || arg2[0] == '\0' )
build.c: In function ‘do_redit’:
build.c:6578:11: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( !arg2 || arg2[0] == '\0' )
change it to
if( arg2 == NULL || arg2[0] == '\0' )
build.c: In function ‘edit_buffer’:
build.c:6843:16: warning: array subscript has type ‘char’
find
if( !isspace( *tptr ) )
change it to
if( !isspace( (int)*tptr ) )
build.c: In function ‘edit_buffer’:
build.c:6867:16: warning: array subscript has type ‘char’
build.c:6869:16: warning: array subscript has type ‘char’
find
while( isspace( *sptr ) && *sptr )
sptr++;
while( !isspace( *sptr ) && *sptr )
change it to
while( isspace( (int)*sptr ) && *sptr )
sptr++;
while( !isspace( (int)*sptr ) && *sptr )
Now there are more in build.c but first got rid of all those basic ones and now to the others (in reverse order to keep line numbers in order since they might change some)
build.c: In function ‘do_recipe’:
build.c:4050:37: warning: operation on ‘pObjIndex’ may be undefined
build.c:4050:37: warning: operation on ‘pObjIndex’ may be undefined
find
sprintf( buf, "%d: %s + %s = %s\r\n",
recipe->number,
( pObjIndex = get_obj_index( recipe->ingred1 ) ) ?
pObjIndex->short_descr : "???",
( pObjIndex = get_obj_index( recipe->ingred2 ) ) ?
pObjIndex->short_descr : "???",
( pObjIndex = get_obj_index( recipe->result ) ) ? pObjIndex->short_descr : "???" );
send_to_char( buf, ch );
change it to
ch_printf( ch, "%d: %s + ", recipe->number, ( pObjIndex = get_obj_index( recipe->ingred1 ) ) ? pObjIndex->short_descr : "???" );
ch_printf( ch, "%s = ", ( pObjIndex = get_obj_index( recipe->ingred2 ) ) ? pObjIndex->short_descr : "???" );
ch_printf( ch, "%s\r\n", ( pObjIndex = get_obj_index( recipe->result ) ) ? pObjIndex->short_descr : "???" );
build.c: In function ‘do_recipe’:
build.c:4010:34: warning: operation on ‘pObjIndex’ may be undefined
build.c:4010:34: warning: operation on ‘pObjIndex’ may be undefined
find
sprintf( buf, "%d: %s + %s = %s\r\n",
recipe->number,
( pObjIndex = get_obj_index( recipe->ingred1 ) ) ?
pObjIndex->short_descr : "???",
( pObjIndex = get_obj_index( recipe->ingred2 ) ) ?
pObjIndex->short_descr : "???",
( pObjIndex = get_obj_index( recipe->result ) ) ? pObjIndex->short_descr : "???" );
send_to_char( buf, ch );
change it to
ch_printf( ch, "%d: %s + ", recipe->number, ( pObjIndex = get_obj_index( recipe->ingred1 ) ) ? pObjIndex->short_descr : "???" );
ch_printf( ch, "%s = ", ( pObjIndex = get_obj_index( recipe->ingred2 ) ) ? pObjIndex->short_descr : "???" );
ch_printf( ch, "%s\r\n", ( pObjIndex = get_obj_index( recipe->result ) ) ? pObjIndex->short_descr : "???" );
build.c: In function ‘do_material’:
build.c:3382:31: warning: ‘material’ may be used uninitialized in this function
find
if( !first_material )
{ /* Ok, get this new material added into the list */
first_material = new_material;
last_material = new_material;
new_material->number = 1;
}
else if( first_material->number != 1 )
{
first_material->prev = material;
material->next = first_material;
material->prev = NULL;
material->number = 1;
first_material = material;
}
else
{
change it to
if( !first_material )
{ /* Ok, get this new material added into the list */
first_material = new_material;
last_material = new_material;
new_material->number = 1;
}
else
{
The part it was complaining about was inside the else if and material wasn't defined and just the whole thing looked pointless considering as far as i can tell first_material->number should be 1.
bits.c
-----------
bits.c: In function ‘do_qbit’:
bits.c:890:5: warning: the address of ‘buf’ will always evaluate as ‘true’
find
if( !buf || buf[0] == '\0' )
change it to
if( buf == NULL || buf[0] == '\0' )
city.c
---------
city.c: In function ‘do_city’:
city.c:702:5: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( arg2 )
change it to
if( arg2 != NULL )
clan.c
-------------
clan.c: In function ‘do_clan’:
clan.c:159:5: warning: the address of ‘arg1’ will always evaluate as ‘true’
find
if( arg1 == NULL || arg1[0] == '\0' )
clan.c: In function ‘do_clan’:
clan.c:225:5: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( !arg2 || arg2[0] == '\0' )
change it to
if( arg2 == NULL || arg2[0] == '\0' )
combat.c
--------
combat.c: In function ‘ranged_attack’:
combat.c:770:11: warning: the address of ‘arg1’ will always evaluate as ‘true’
find
if( !arg1 || arg1[0] == '\0' )
change it to
if( arg1 == NULL || arg1[0] == '\0' )
comm.c
---------
comm.c: In function ‘read_from_buffer’:
comm.c:1210:7: warning: array subscript has type ‘char’
find
else if( isascii( d->inbuf[i] ) && isprint( d->inbuf[i] ) )
change it to
else if( isascii( d->inbuf[i] ) && isprint( (int)d->inbuf[i] ) )
comm.c: In function ‘nanny’:
comm.c:1581:4: warning: array subscript has type ‘char’
find
while( isspace( *argument ) )
change it to
while( isspace( (int)*argument ) )
comm.c: In function ‘check_parse_name’:
comm.c:2090:10: warning: array subscript has type ‘char’
find
if( !isalpha( *pc ) && pc[0] != '-' )
change it to
if( !isalpha( (int)*pc ) && pc[0] != '-' )
comm.c: In function ‘set_pager_input’:
comm.c:3235:4: warning: array subscript has type ‘char’
find
while( isspace( *argument ) )
change it to
while( isspace( (int)*argument ) )
comm.c: In function ‘pager_output’:
comm.c:3292:4: warning: array subscript has type ‘char’
find
while( isspace( *last ) )
change it to
while( isspace( (int)*last ) )
db.c
------------
db.c: In function ‘fread_letter’:
db.c:2978:4: warning: array subscript has type ‘char’
find
while( isspace( c ) );
change it to
while( isspace( (int)c ) );
db.c: In function ‘fread_number’:
db.c:3005:4: warning: array subscript has type ‘char’
find
while( isspace( c ) );
change it to
while( isspace( (int)c ) );
db.c: In function ‘fread_number’:
db.c:3020:4: warning: array subscript has type ‘char’
db.c:3028:4: warning: array subscript has type ‘char’
find
if( !isdigit( c ) )
{
bug( "Fread_number: bad format. (%c)", c );
if( fBootDb )
exit( 1 );
return 0;
}
while( isdigit( c ) )
change it to
if( !isdigit( (int)c ) )
{
bug( "Fread_number: bad format. (%c)", c );
if( fBootDb )
exit( 1 );
return 0;
}
while( isdigit( (int)c ) )
db.c: In function ‘fread_string’:
db.c:3099:4: warning: array subscript has type ‘char’
find
while( isspace( c ) );
change it to
while( isspace( (int)c ) );
db.c: In function ‘fread_string_nohash’:
db.c:3173:4: warning: array subscript has type ‘char’
find
while( isspace( c ) );
change it to
while( isspace( (int)c ) );
db.c: In function ‘fread_line’:
db.c:3280:4: warning: array subscript has type ‘char’
find
while( isspace( c ) );
change it to
while( isspace( (int)c ) );
db.c: In function ‘fread_word’:
db.c:3338:4: warning: array subscript has type ‘char’
find
while( isspace( cEnd ) );
change it to
while( isspace( (int)cEnd ) );
db.c: In function ‘fread_word’:
db.c:3362:7: warning: array subscript has type ‘char’
find
if( cEnd == ' ' ? isspace( *pword ) : *pword == cEnd )
change it to
if( cEnd == ' ' ? isspace( (int)*pword ) : *pword == cEnd )
elkandu.c
-----------
elkandu.c: In function ‘seek_find’:
elkandu.c:3386:10: warning: array subscript has type ‘char’
find
sprintf( buf, "%s%c/%s", PLAYER_DIR, tolower( argument[0] ), name );
change it to
sprintf( buf, "%s%c/%s", PLAYER_DIR, tolower( (int)argument[0] ), name );
elkandu.c: In function ‘ch_change’:
elkandu.c:5855:27: warning: the address of ‘arg1’ will always evaluate as ‘true’
find
if( !argument || !arg1 )
change it to
if( !argument || arg1 == NULL )
elkandu.c: In function ‘do_magic’:
elkandu.c:7672:11: warning: the address of ‘arg2’ will always evaluate as ‘true’
elkandu.c:7676:17: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( arg2 && ( action = check_verb( arg2 ) ) == ACT_TRICKS )
{
if( power < 10 )
{
if( arg2 && ( power = check_power( arg2 ) ) == -1 )
change it to
if( arg2 != NULL && ( action = check_verb( arg2 ) ) == ACT_TRICKS )
{
if( power < 10 )
{
if( arg2 != NULL && ( power = check_power( arg2 ) ) == -1 )
elkandu.c: In function ‘do_magic’:
elkandu.c:7712:14: warning: the address of ‘arg2’ will always evaluate as ‘true’
find
if( arg2 && ( power = check_power( arg2 ) ) == -1 )
change it to
if( arg2 != NULL && ( power = check_power( arg2 ) ) == -1 )
elkandu.c: In function ‘do_magic’:
elkandu.c:7748:11: warning: the address of ‘arg3’ will always evaluate as ‘true’
elkandu.c:7752:17: warning: the address of ‘arg3’ will always evaluate as ‘true’
find
if( arg3 && ( power = check_power( arg3 ) ) == -1 )
{
if( action == ACT_TRICKS )
{
if( arg3 && ( action = check_verb( arg3 ) ) == ACT_TRICKS )
change it to
if( arg3 != NULL && ( power = check_power( arg3 ) ) == -1 )
{
if( action == ACT_TRICKS )
{
if( arg3 != NULL && ( action = check_verb( arg3 ) ) == ACT_TRICKS )
elkandu.c: In function ‘do_magic’:
elkandu.c:7785:14: warning: the address of ‘arg3’ will always evaluate as ‘true’
find
if( arg3 && ( action = check_verb( arg3 ) ) == ACT_TRICKS )
change it to
if( arg3 != NULL && ( action = check_verb( arg3 ) ) == ACT_TRICKS )
elkandu.c: In function ‘do_magic’:
elkandu.c:7978:19: warning: the address of ‘arg4’ will always evaluate as ‘true’
find
else if( !arg4 || arg4[0] == '\0' )
change it to
else if( arg4 == NULL || arg4[0] == '\0' )
elkandu.c: In function ‘obj_move’:
elkandu.c:3902:23: warning: ‘victim’ may be used uninitialized in this function
at the top of the function
find
CHAR_DATA *victim;
remove that line then
find
if( IS_OBJ_STAT( obj, ITEM_DREAMWORLD ) /* Thanks Smokey */
|| IS_OBJ_STAT( obj, ITEM_ARTIFACT ) /* Thanks Waffle */
|| victim->carry_weight + get_obj_weight( obj ) > can_carry_w( target ) )
change it to
if( IS_OBJ_STAT( obj, ITEM_DREAMWORLD ) /* Thanks Smokey */
|| IS_OBJ_STAT( obj, ITEM_ARTIFACT ) /* Thanks Waffle */
|| target->carry_weight + get_obj_weight( obj ) > can_carry_w( target ) )
fight.c
--------
fight.c: In function ‘multi_hit’:
fight.c:864:1: warning: ‘retcode’ may be used uninitialized in this function
at the top of the function find
ch_ret retcode;
remove that line and then
find
return retcode;
change it to
return rNONE;