tbaMUD 3.67 Warnings

  • Fizban
  • Fizban's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
More
1 year 7 months ago #6173 by Fizban
Fizban created the topic: tbaMUD 3.67 Warnings
act.item.c: In function ‘do_drink’:
act.item.c:883:61: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
   if ((GET_OBJ_VAL(temp, 1) == 0) || (!GET_OBJ_VAL(temp, 0) == 1)) {
                                                             ^
ibt.c: In function ‘read_ibt’:
ibt.c:123:17: warning: variable ‘flgCheck’ set but not used [-Wunused-but-set-variable]
    bool fMatch, flgCheck;
                 ^
ibt.c: In function ‘save_ibt_file’:
ibt.c:290:36: warning: variable ‘last_ibt’ set but not used [-Wunused-but-set-variable]
    IBT_DATA *ibtData, *first_ibt, *last_ibt;
                                    ^
ibt.c: In function ‘do_ibt’:
ibt.c:458:35: warning: variable ‘last_ibt’ set but not used [-Wunused-but-set-variable]
   IBT_DATA *ibtData, *first_ibt, *last_ibt;
                                   ^
ibt.c: In function ‘do_oasis_ibtedit’:
ibt.c:763:59: warning: variable ‘buf3’ set but not used [-Wunused-but-set-variable]
   char buf1[MAX_STRING_LENGTH], buf2[MAX_STRING_LENGTH], *buf3;
                                                           ^
db.c: In function ‘fread_action’:
db.c:159:9: warning: variable ‘buf1’ set but not used [-Wunused-but-set-variable]
   char *buf1;
         ^
db.c: In function ‘boot_social_messages’:
db.c:191:64: warning: variable ‘buf’ set but not used [-Wunused-but-set-variable]
   char next_soc[MAX_STRING_LENGTH], sorted[MAX_INPUT_LENGTH], *buf;
                                                                ^
db.c:190:68: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
   int nr = 0, hide, min_char_pos, min_pos, min_lvl, curr_soc = -1, i;
                                                                    ^
db.c: In function ‘reset_time’:
db.c:799:7: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
   int i;
       ^
db.c: In function ‘index_boot’:
db.c:917:31: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
   int rec_count = 0, size[2], i;
                               ^
gcc -g -O2 -Wall -Wno-char-subscripts    -c -o zedit.o zedit.c
gcc -g -O2 -Wall -Wno-char-subscripts    -c -o medit.o medit.c
medit.c: In function ‘do_oasis_medit’:
medit.c:48:9: warning: variable ‘buf3’ set but not used [-Wunused-but-set-variable]
   char *buf3;
         ^
msgedit.c:78:19: warning: variable ‘buf’ set but not used [-Wunused-but-set-variable]
   char chk[128], *buf;
                   ^
gcc -g -O2 -Wall -Wno-char-subscripts    -c -o mud_event.o mud_event.c
mud_event.c: In function ‘event_countdown’:
mud_event.c:57:22: warning: variable ‘ch’ set but not used [-Wunused-but-set-variable]
   struct char_data * ch = NULL;
                      ^
limits.c: In function ‘run_autowiz’:
limits.c:201:9: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
     int i;
         ^
act.wizard.c: In function ‘mod_llog_entry’:
act.wizard.c:1851:27: warning: variable ‘j’ set but not used [-Wunused-but-set-variable]
   int size, recs, tmp, i, j;
                           ^
act.wizard.c:1851:24: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
   int size, recs, tmp, i, j;
                        ^
act.wizard.c: In function ‘add_llog_entry’:
act.wizard.c:1897:7: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
   int i;
       ^
act.wizard.c: In function ‘clean_llog_entries’:
act.wizard.c:1936:16: warning: variable ‘j’ set but not used [-Wunused-but-set-variable]
   int recs, i, j;
                ^
act.wizard.c:1936:13: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
   int recs, i, j;
             ^
act.wizard.c: In function ‘list_llog_entries’:
act.wizard.c:1976:7: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
   int i;
       ^
act.wizard.c: In function ‘do_last’:
act.wizard.c:2013:13: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
   int recs, i, num = 0;
             ^
act.wizard.c: In function ‘do_wiznet’:
act.wizard.c:2154:8: warning: variable ‘any’ set but not used [-Wunused-but-set-variable]
   char any = FALSE;
        ^
act.wizard.c: In function ‘do_copyover’:
act.wizard.c:4133:7: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
   int i;
       ^
act.wizard.c: In function ‘do_file’:
act.wizard.c:4271:10: warning: variable ‘j’ set but not used [-Wunused-but-set-variable]
   int i, j;               /* Generic loop counters. */
          ^
prefedit.c: In function ‘do_oasis_prefedit’:
prefedit.c:897:9: warning: variable ‘buf3’ set but not used [-Wunused-but-set-variable]
   char *buf3;
         ^
gcc -g -O2 -Wall -Wno-char-subscripts    -c -o boards.o boards.c
boards.c: In function ‘board_save_board’:
boards.c:414:10: warning: variable ‘j’ set but not used [-Wunused-but-set-variable]
   int i, j;
          ^
boards.c: In function ‘board_load_board’:
boards.c:453:10: warning: variable ‘j’ set but not used [-Wunused-but-set-variable]
   int i, j, len1, len2;
          ^
gcc -g -O2 -Wall -Wno-char-subscripts    -c -o qedit.o qedit.c
qedit.c: In function ‘do_oasis_qedit’:
qedit.c:59:9: warning: variable ‘buf3’ set but not used [-Wunused-but-set-variable]
   char *buf3;
         ^
gcc -g -O2 -Wall -Wno-char-subscripts    -c -o shop.o shop.c
shop.c: In function ‘read_type_list’:
shop.c:1088:39: warning: variable ‘buf1’ set but not used [-Wunused-but-set-variable]
   char *ptr, buf[MAX_STRING_LENGTH], *buf1;
                                       ^
sedit.c: In function ‘do_oasis_sedit’:
sedit.c:53:9: warning: variable ‘buf3’ set but not used [-Wunused-but-set-variable]
   char *buf3;
         ^
redit.c: In function ‘do_oasis_redit’:
redit.c:37:9: warning: variable ‘buf3’ set but not used [-Wunused-but-set-variable]
   char *buf3;
         ^
dg_scripts.c:2156:13: warning: variable ‘context’ set but not used [-Wunused-but-set-variable]
   long uid, context;
             ^
dg_scripts.c: In function ‘process_rdelete’:
dg_scripts.c:2264:13: warning: variable ‘context’ set but not used [-Wunused-but-set-variable]
   long uid, context;
             ^
protocol.c: In function ‘PerformHandshake’:
protocol.c:1534:11: warning: variable ‘bResult’ set but not used [-Wunused-but-set-variable]
    bool_t bResult = true;
           ^
gcc -g -O2 -Wall -Wno-char-subscripts    -c -o oedit.o oedit.c
oedit.c: In function ‘do_oasis_oedit’:
oedit.c:56:9: warning: variable ‘buf3’ set but not used [-Wunused-but-set-variable]
   char *buf3;
         ^
autowiz.c: In function ‘get_line’:
autowiz.c:262:20: warning: variable ‘buf2’ set but not used [-Wunused-but-set-variable]
   char temp[256], *buf2;
                    ^
shopconv.c: In function ‘do_list’:
shopconv.c:62:33: warning: variable ‘buf2’ set but not used [-Wunused-but-set-variable]
   char buf[MAX_STRING_LENGTH], *buf2;
                                 ^
shopconv.c:61:20: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
   int count, temp, i;
                    ^
shopconv.c: In function ‘do_float’:
shopconv.c:79:7: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
   int i;
       ^
shopconv.c: In function ‘do_int’:
shopconv.c:91:10: warning: variable ‘j’ set but not used [-Wunused-but-set-variable]
   int i, j;
          ^
shopconv.c: In function ‘main’:
shopconv.c:159:22: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
   int result, index, i;
                      ^
wld2html.c: In function ‘get_line’:
wld2html.c:499:20: warning: variable ‘buf2’ set but not used [-Wunused-but-set-variable]
   char temp[256], *buf2;
                    ^

Ton of warnings upon compile of tbaMUD-3.67 with gcc version 5.4.0.

I'll try to get around to fixing them, but figured I'd paste them all here as well so others who are already using the code can fix them as well.

Please Log in or Create an account to join the conversation.

Time to create page: 0.820 seconds