Cleaned up numerous warnings found by adding -Wextra -Wcast-qual -Wshadow -Wno-unused flags. --Rumble

This commit is contained in:
Rumble 2008-05-07 23:34:40 +00:00
parent e8c87e82e4
commit 4f1403558a
28 changed files with 186 additions and 187 deletions

View file

@ -510,10 +510,8 @@ static OCMD(do_dgoload)
two_arguments(target, arg1, arg2); /* recycling ... */
tch = get_char_near_obj(obj, arg1);
if (tch) {
if (arg2 && *arg2 &&
(pos = find_eq_pos_script(arg2)) >= 0 &&
!GET_EQ(tch, pos) &&
can_wear_on_pos(object, pos)) {
if (arg2 != NULL && *arg2 && (pos = find_eq_pos_script(arg2)) >= 0 &&
!GET_EQ(tch, pos) && can_wear_on_pos(object, pos)) {
equip_char(tch, object, pos);
load_otrigger(object);
return;
@ -688,8 +686,7 @@ static OCMD(do_osetval)
int position, new_value;
two_arguments(argument, arg1, arg2);
if (!arg1 || !*arg1 || !arg2 || !*arg2 ||
!is_number(arg1) || !is_number(arg2)) {
if (arg1 == NULL || !*arg1 || arg2 == NULL || !*arg2 || !is_number(arg1) || !is_number(arg2)) {
obj_log(obj, "osetval: bad syntax");
return;
}