hi there...
here are the problems and warnings:
act_info.c: In function 'do_look':
act_info.c:1123: warning: suggest explicit braces to avoid ambiguous 'else'
pdesc = get_extra_descr( arg3, obj->extra_descr );
if ( pdesc != NULL )
if (++count == number)
{
send_to_char( pdesc, ch );
return;
}
else continue;
act_info.c:1132: warning: suggest explicit braces to avoid ambiguous 'else'
pdesc = get_extra_descr( arg3, obj->pIndexData->extra_descr );
if ( pdesc != NULL )
if (++count == number)
{
send_to_char( pdesc, ch );
return;
}
else continue;
act_obj.c: In function 'do_put':
act_info.c:424: warning: suggest explicit braces to avoid ambiguous 'else'
if (container->pIndexData->vnum == OBJ_VNUM_PIT
&& !CAN_WEAR(container,ITEM_TAKE))
if (obj->timer)
SET_BIT(obj->extra_flags,ITEM_HAD_TIMER);
else
obj->timer = number_range(100,200);
act_info.c:462: warning: suggest explicit braces to avoid ambiguous 'else'
if (container->pIndexData->vnum == OBJ_VNUM_PIT
&& !CAN_WEAR(obj, ITEM_TAKE) )
if (obj->timer)
SET_BIT(obj->extra_flags,ITEM_HAD_TIMER);
else
obj->timer = number_range(100,200);
obj_from_char( obj );
obj_to_obj( obj, container );
act_obj.c: In function 'get_cost':
act_obj.c:2496: warning: suggest explicit braces to avoid ambiguous 'else'
if (!IS_OBJ_STAT(obj,ITEM_SELL_EXTRACT))
for ( obj2 = keeper->carrying; obj2; obj2 = obj2->next_content )
{
if ( obj->pIndexData == obj2->pIndexData
&& !str_cmp(obj->short_descr,obj2->short_descr) )
if (IS_OBJ_STAT(obj2,ITEM_INVENTORY))
cost /= 2;
else
cost = cost * 3 / 4;
}
comm.c: In function 'process_output':
comm.c:1256: warning: suggest explicit braces to avoid ambiguous 'else'
if ( !merc_down )
if ( d->showstr_point )
write_to_buffer( d, "[Hit Return to continue]\n\r", 0 );
else if ( fPrompt && d->pString && d->connected == CON_PLAYING )
write_to_buffer( d, "> ", 2 );
else if ( fPrompt && d->connected == CON_PLAYING )
{
db.c: In function 'assign_area_vnum':
db.c:584: warning: suggest explicit braces to avoid ambiguous 'else'
void assign_area_vnum( int vnum )
{
if ( area_last->min_vnum == 0 || area_last->max_vnum == 0 )
area_last->min_vnum = area_last->max_vnum = vnum;
if ( vnum != URANGE( area_last->min_vnum, vnum, area_last->max_vnum ) )
if ( vnum < area_last->min_vnum )
area_last->min_vnum = vnum;
else
area_last->max_vnum = vnum;
return;
}
fight.c: In function 'one_hit':
fight.c:579: warning: suggest explicit braces to avoid ambiguous 'else'
if ( dt == gsn_backstab && wield != NULL)
if ( wield->value[0] != 2 )
dam *= 2 + (ch->level / 10);
else
dam *= 2 + (ch->level / 8);
handler.c: In function 'reset_char':
handler.c:521: warning: suggest explicit braces to avoid ambiguous 'else'
if (ch->pcdata->true_sex < 0 || ch->pcdata->true_sex > 2)
if (ch->sex > 0 && ch->sex < 3)
ch->pcdata->true_sex = ch->sex;
else
ch->pcdata->true_sex = 0;
handler.c: In function 'get_max_train':
handler.c:725: warning: suggest explicit braces to avoid ambiguous 'else'
if (class_table[ch->class].attr_prime == stat)
if (ch->race == race_lookup("human"))
max += 3;
else
max += 2;
return UMIN(max,25);
handler.c: In function 'unequip_char':
handler.c:1608: warning: suggest explicit braces to avoid ambiguous 'else'
if (!obj->enchanted)
for ( paf = obj->pIndexData->affected; paf != NULL; paf = paf->next )
if ( paf->location == APPLY_SPELL_AFFECT )
{
for ( lpaf = ch->affected; lpaf != NULL; lpaf = lpaf_next )
{
lpaf_next = lpaf->next;
if ((lpaf->type == paf->type) &&
(lpaf->level == paf->level) &&
(lpaf->location == APPLY_SPELL_AFFECT))
{
affect_remove( ch, lpaf );
lpaf_next = NULL;
}
magic.c: In function 'obj_cast_spell':
magic.c:643: warning: suggest explicit braces to avoid ambiguous 'else'
if ( victim == NULL && obj == NULL)
if (ch->fighting != NULL)
victim = ch->fighting;
else
{
send_to_char("You can't do that.\n\r",ch);
return;
}
magic.c: In function 'spell_earthquake':
magic.c:2203: warning: suggest explicit braces to avoid ambiguous 'else'
if ( vch != ch && !is_safe_spell(ch,vch,TRUE))
if (IS_AFFECTED(vch,AFF_FLYING))
damage(ch,vch,0,sn,DAM_BASH,TRUE);
else
damage( ch,vch,level + dice(2, 8), sn, DAM_BASH,TRUE);
continue;
}
bit.c: In function 'flag_string':
bit.c:165: warning: operation on 'toggle' may be undefined
toggle = (++toggle) % 10;
buf[toggle][0] = '\0';
for (flag = 0; flag_table[flag].name != NULL; flag++)
screen.c: In function 'UpdateOLCScreen':
screen.c:658: warning: operation on 'i' may be undefined
screen.c:658: warning: operation on 'i' may be undefined
{
if ( d->screenmap[i] == d->oldscreenmap[i] )
{
i++;
continue;
}
sprintf(buf2, VT_CURSPOS "%c", i/80+1, i%80, d->screenmap[i++] );
strcat(buf, buf2);
j += strlen(buf2);
while ( d->screenmap && d->screenmap[i] != d->oldscreenmap[i] )
buf[j++] = d->screenmap[i++];
buf[j] = '\0';
}
hope you help me with these, greetings. |