Created
September 16, 2020 02:53
-
-
Save sean-gilliam/100bc334eb150f54683c706b4de80435 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error while trying to load a compilation database: | |
Could not auto-detect compilation database for file "code/act_comm.c" | |
No compilation database found in /home/sgilliam/src/riftshadow/code or any parent directory | |
fixed-compilation-database: Error while opening fixed database: No such file or directory | |
json-compilation-database: Error while opening JSON database: No such file or directory | |
Running without flags. | |
962 warnings and 1 error generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/act_comm.c. | |
1725 warnings and 21 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/act_ente.c. | |
3277 warnings and 41 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/act_info.c. | |
4468 warnings and 61 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/act_move.c. | |
6123 warnings and 81 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/act_obj.c. | |
7762 warnings and 101 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/act_wiz.c. | |
8522 warnings and 121 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/alias.c. | |
9690 warnings and 141 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/ap.c. | |
10547 warnings and 161 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/aprog.c. | |
11312 warnings and 181 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/ban.c. | |
12103 warnings and 201 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/bit.c. | |
12165 warnings and 221 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/bitvector.c. | |
13021 warnings and 241 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/bootup.c. | |
14024 warnings and 261 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/cabal.c. | |
14868 warnings and 281 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/chardef.c. | |
15689 warnings and 301 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/chrono.c. | |
15783 warnings and 321 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/class.c. | |
17125 warnings and 341 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/comm.c. | |
19005 warnings and 361 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/const.c. | |
19966 warnings and 381 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/db2.c. | |
21646 warnings and 401 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/db.c. | |
22928 warnings and 402 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/devextra.c. | |
23962 warnings and 403 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/dioextra.c. | |
24716 warnings and 423 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/druid.c. | |
25733 warnings and 443 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/effects.c. | |
29094 warnings and 463 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/fight.c. | |
29240 warnings and 483 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/file.c. | |
30008 warnings and 503 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/flags.c. | |
32671 warnings and 523 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/handler.c. | |
33471 warnings and 543 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/heal.c. | |
34231 warnings and 563 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/healer.c. | |
35013 warnings and 564 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/help.c. | |
35894 warnings and 584 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/interp.c. | |
37517 warnings and 604 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/iprog.c. | |
38279 warnings and 624 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/ispec.c. | |
39136 warnings and 644 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/lookup.c. | |
41453 warnings and 664 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/magic.c. | |
42210 warnings and 684 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/main.c. | |
42958 warnings and 704 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/material.c. | |
43731 warnings and 724 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/mem.c. | |
44874 warnings and 744 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/misc.c. | |
45824 warnings and 764 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/moremagic.c. | |
47297 warnings and 784 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/mprog.c. | |
48126 warnings and 804 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/mspec.c. | |
48895 warnings and 824 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/mud.c. | |
49953 warnings and 844 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/necro.c. | |
50736 warnings and 864 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/newmem.c. | |
51484 warnings and 884 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/newspec.c. | |
52264 warnings and 885 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/note.c. | |
53935 warnings and 905 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/olc_act.c. | |
54896 warnings and 925 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/olc.c. | |
55947 warnings and 945 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/olc_save.c. | |
56932 warnings and 965 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/paladin.c. | |
57779 warnings and 985 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/prof.c. | |
58527 warnings and 1005 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/progs.c. | |
59496 warnings and 1025 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/quest.c. | |
59589 warnings and 1045 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/queue.c. | |
60361 warnings and 1065 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/race.c. | |
61238 warnings and 1085 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/recycle.c. | |
62160 warnings and 1105 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/rprog.c. | |
62245 warnings and 1125 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/rstring.c. | |
63287 warnings and 1145 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/save.c. | |
64082 warnings and 1165 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/scan.c. | |
64962 warnings and 1185 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/skills.c. | |
67696 warnings and 1205 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/sorcerer.c. | |
67850 warnings and 1225 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/sql.c. | |
68656 warnings and 1245 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/string.c. | |
68741 warnings and 1265 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/strings.c. | |
69180 warnings and 1285 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/tables.c. | |
69936 warnings and 1305 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/tattoo.c. | |
70994 warnings and 1325 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/thief.c. | |
71742 warnings and 1345 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/titles.c. | |
71779 warnings and 1365 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/tstring.c. | |
73389 warnings and 1385 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/update.c. | |
75291 warnings and 1405 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/warrior.c. | |
76080 warnings and 1425 errors generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/zealot.c. | |
error: too many errors emitted, stopping now [clang-diagnostic-error] | |
/home/sgilliam/src/riftshadow/code/act_comm.c:38:36: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_delet(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:43:37: warning: pointer parameter 'argument' can be pointer to const [readability-non-const-parameter] | |
void do_delete(CHAR_DATA *ch, char *argument) | |
^ | |
const | |
/home/sgilliam/src/riftshadow/code/act_comm.c:56:3: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:77:9: warning: variable 'cname' is not initialized [cppcoreguidelines-init-variables] | |
auto cname = palloc_string(ch->true_name); | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:78:9: warning: variable 'save_pfile' is not initialized [cppcoreguidelines-init-variables] | |
auto save_pfile = ((ch->played + (current_time - ch->logon)) / 3600) >= 15; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:105:39: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_channels(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:111:7: warning: variable 'sendToChar' is not initialized [cppcoreguidelines-init-variables] | |
auto sendToChar = [](bool isSet, CHAR_DATA *ch) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:163:35: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_deaf(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:177:36: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_quiet(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:190:37: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_replay(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:276:34: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(ch, gsn_deafen)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:276:34: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(ch, gsn_deafen)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:276:34: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(ch, gsn_deafen)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:282:2: warning: if with identical then and else branches [bugprone-branch-clone] | |
if (IS_SET(ch->comm, COMM_ANSI)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:291:2: note: else branch starts here | |
else | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:301:2: warning: this loop is infinite; none of its condition variables (d) are updated in the loop body [bugprone-infinite-loop] | |
for (auto d = descriptor_list; d != NULL; d = d->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:310:4: warning: if with identical then and else branches [bugprone-branch-clone] | |
if (IS_SET(d->character->comm, COMM_ANSI)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:319:4: note: else branch starts here | |
else | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:332:37: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_global(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:352:2: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:393:2: warning: this loop is infinite; none of its condition variables (wch) are updated in the loop body [bugprone-infinite-loop] | |
for (auto wch = char_list; wch != NULL; wch = wch->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:416:6: warning: variable 'trust' is not initialized [cppcoreguidelines-init-variables] | |
int trust = ch->level; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:423:2: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:464:2: warning: this loop is infinite; none of its condition variables (wch) are updated in the loop body [bugprone-infinite-loop] | |
for (auto wch = char_list; wch != NULL; wch = wch->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:489:23: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:489:23: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:489:23: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:520:14: warning: 51 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
int level = 51; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:520:14: warning: 51 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_comm.c:523:11: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
level = atoi(arg1); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:524:40: warning: 51 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (level > get_trust(ch) || level < 51) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:524:40: warning: 51 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_comm.c:526:12: warning: 51 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
level = 51; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:526:12: warning: 51 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_comm.c:541:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (level > LEVEL_HERO) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:541:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (level > LEVEL_HERO) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:541:25: warning: statement should be inside braces [readability-braces-around-statements] | |
if (level > LEVEL_HERO) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:543:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:543:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:543:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:558:2: warning: this loop is infinite; none of its condition variables (wch) are updated in the loop body [bugprone-infinite-loop] | |
for (auto wch = char_list; wch != NULL; wch = wch->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:607:8: warning: variable 'o' is not initialized [cppcoreguidelines-init-variables] | |
char *o; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_comm.c:609:16: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (i == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:609:16: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (i == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:609:16: warning: statement should be inside braces [readability-braces-around-statements] | |
if (i == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:625:8: warning: variable 'o' is not initialized [cppcoreguidelines-init-variables] | |
char *o; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_comm.c:700:44: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (argument[strlen(argument) - 1] == '!') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:700:44: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (argument[strlen(argument) - 1] == '!') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:700:44: warning: statement should be inside braces [readability-braces-around-statements] | |
if (argument[strlen(argument) - 1] == '!') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:702:49: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (argument[strlen(argument) - 1] == '?') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:702:49: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (argument[strlen(argument) - 1] == '?') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:702:49: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (argument[strlen(argument) - 1] == '?') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:704:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:704:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:704:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:711:2: warning: this loop is infinite; none of its condition variables (victim) are updated in the loop body [bugprone-infinite-loop] | |
for (auto victim = ch->in_room->people; victim != NULL; victim = victim->next_in_room) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:711:12: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
for (auto victim = ch->in_room->people; victim != NULL; victim = victim->next_in_room) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:733:2: warning: this loop is infinite; none of its condition variables (room_char) are updated in the loop body [bugprone-infinite-loop] | |
for (auto room_char = ch->in_room->people; room_char != NULL; room_char = room_char->next_in_room) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:733:12: warning: variable 'room_char' is not initialized [cppcoreguidelines-init-variables] | |
for (auto room_char = ch->in_room->people; room_char != NULL; room_char = room_char->next_in_room) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:747:2: warning: this loop is infinite; none of its condition variables (char_obj) are updated in the loop body [bugprone-infinite-loop] | |
for (auto char_obj = ch->carrying; char_obj != NULL; char_obj = char_obj->next_content) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:747:12: warning: variable 'char_obj' is not initialized [cppcoreguidelines-init-variables] | |
for (auto char_obj = ch->carrying; char_obj != NULL; char_obj = char_obj->next_content) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:756:2: warning: this loop is infinite; none of its condition variables (char_obj) are updated in the loop body [bugprone-infinite-loop] | |
for (auto char_obj = ch->in_room->contents; char_obj != NULL; char_obj = char_obj->next_content) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:756:12: warning: variable 'char_obj' is not initialized [cppcoreguidelines-init-variables] | |
for (auto char_obj = ch->in_room->contents; char_obj != NULL; char_obj = char_obj->next_content) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:818:44: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (argument[strlen(argument) - 1] == '!') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:818:44: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (argument[strlen(argument) - 1] == '!') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:818:44: warning: statement should be inside braces [readability-braces-around-statements] | |
if (argument[strlen(argument) - 1] == '!') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:820:49: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (argument[strlen(argument) - 1] == '?') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:820:49: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (argument[strlen(argument) - 1] == '?') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:820:49: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (argument[strlen(argument) - 1] == '?') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:822:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:822:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:822:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:891:2: warning: this loop is infinite; none of its condition variables (victim) are updated in the loop body [bugprone-infinite-loop] | |
for (auto victim = ch->in_room->people; victim != NULL; victim = victim->next_in_room) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:891:12: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
for (auto victim = ch->in_room->people; victim != NULL; victim = victim->next_in_room) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:967:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char buf[MAX_STRING_LENGTH], buf2[MAX_STRING_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:974:7: warning: variable 'length' is not initialized [cppcoreguidelines-init-variables] | |
auto length = !IS_NPC(ch) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:979:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int i, j, lines = 1; | |
^~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:979:6: warning: variable 'i' is not initialized [cppcoreguidelines-init-variables] | |
int i, j, lines = 1; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:979:9: warning: variable 'j' is not initialized [cppcoreguidelines-init-variables] | |
int i, j, lines = 1; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1004:14: warning: 9 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (lines > 9) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1004:14: warning: 9 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1034:2: warning: this loop is infinite; none of its condition variables (victim) are updated in the loop body [bugprone-infinite-loop] | |
for (auto victim = ch->in_room->people; victim; victim = victim->next_in_room) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1034:12: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
for (auto victim = ch->in_room->people; victim; victim = victim->next_in_room) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1057:35: warning: pointer parameter 'argument' can be pointer to const [readability-non-const-parameter] | |
void do_pray(CHAR_DATA *ch, char *argument) | |
^ | |
const | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1071:17: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
WAIT_STATE(ch, 10); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1071:17: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1077:46: warning: use 'fopen' mode 'e' to set O_CLOEXEC [android-cloexec-fopen] | |
auto fp = fopen(RIFT_AREA_DIR "/prays.txt", "a"); | |
^~~ | |
"ae" | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1089:2: warning: this loop is infinite; none of its condition variables (d) are updated in the loop body [bugprone-infinite-loop] | |
for (auto d = descriptor_list; d != NULL; d = d->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1091:8: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
auto victim = d->original ? d->original : d->character; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1183:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (++count == number) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1183:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (++count == number) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1183:25: warning: statement should be inside braces [readability-braces-around-statements] | |
if (++count == number) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1250:11: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (deaf) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1250:11: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (deaf) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1250:11: warning: statement should be inside braces [readability-braces-around-statements] | |
if (deaf) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1254:38: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_noreply(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1258:2: warning: this loop is infinite; none of its condition variables (vch) are updated in the loop body [bugprone-infinite-loop] | |
for (auto vch = char_list; vch; vch = vch->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1273:7: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
auto victim = ch->reply; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1320:27: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!IS_IMMORTAL(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1320:27: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!IS_IMMORTAL(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1320:27: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!IS_IMMORTAL(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1349:11: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (deaf) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1349:11: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (deaf) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1349:11: warning: statement should be inside braces [readability-braces-around-statements] | |
if (deaf) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1425:2: warning: this loop is infinite; none of its condition variables (d) are updated in the loop body [bugprone-infinite-loop] | |
for (auto d = descriptor_list; d != NULL; d = d->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1448:11: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (deaf) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1448:11: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (deaf) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1448:11: warning: statement should be inside braces [readability-braces-around-statements] | |
if (deaf) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1505:55: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (argument[0] != '\'' || UPPER(argument[1]) != 'S') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1505:55: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (argument[0] != '\'' || UPPER(argument[1]) != 'S') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1505:55: warning: statement should be inside braces [readability-braces-around-statements] | |
if (argument[0] != '\'' || UPPER(argument[1]) != 'S') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1529:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char temp[MAX_STRING_LENGTH], tbuf[MAX_STRING_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1533:47: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (temp[0] != '\'' && UPPER(temp[1]) != 'S') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1533:47: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (temp[0] != '\'' && UPPER(temp[1]) != 'S') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1533:47: warning: statement should be inside braces [readability-braces-around-statements] | |
if (temp[0] != '\'' && UPPER(temp[1]) != 'S') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1541:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char *letter, *name; | |
^~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1541:8: warning: variable 'letter' is not initialized [cppcoreguidelines-init-variables] | |
char *letter, *name; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1541:17: warning: variable 'name' is not initialized [cppcoreguidelines-init-variables] | |
char *letter, *name; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1544:2: warning: this loop is infinite; none of its condition variables (vch) are updated in the loop body [bugprone-infinite-loop] | |
for (auto vch = ch->in_room->people; vch != NULL; vch = vch->next_in_room) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1544:12: warning: variable 'vch' is not initialized [cppcoreguidelines-init-variables] | |
for (auto vch = ch->in_room->people; vch != NULL; vch = vch->next_in_room) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1616:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1616:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1616:22: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1676:35: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_rent(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1681:34: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_qui(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1691:39: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_quit_new(CHAR_DATA *ch, char *argument, bool autoq) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1729:52: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(ch, skill_lookup("diamond skin"))) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1729:52: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(ch, skill_lookup("diamond skin"))) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1729:52: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(ch, skill_lookup("diamond skin"))) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1732:47: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(ch, skill_lookup("channel"))) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1732:47: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(ch, skill_lookup("channel"))) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1732:47: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(ch, skill_lookup("channel"))) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1735:49: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(ch, skill_lookup("fortitude"))) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1735:49: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(ch, skill_lookup("fortitude"))) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1735:49: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(ch, skill_lookup("fortitude"))) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1738:38: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(ch, gsn_cloak_form)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1738:38: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(ch, gsn_cloak_form)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1738:38: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(ch, gsn_cloak_form)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1783:36: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(ch, gsn_disguise)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1783:36: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(ch, gsn_disguise)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1783:36: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(ch, gsn_disguise)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1786:35: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(ch, gsn_empathy)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1786:35: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(ch, gsn_empathy)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1786:35: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(ch, gsn_empathy)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1814:12: warning: variable 'obj_next' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1819:3: warning: repeated branch in conditional chain [bugprone-branch-clone] | |
{ | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1822:4: note: end of the original | |
} | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1824:3: note: clone 1 starts here | |
{ | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1831:13: warning: variable 'wch_next' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *wch_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1841:9: warning: variable 'laf' is not initialized [cppcoreguidelines-init-variables] | |
auto laf = wch->affected; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1869:7: warning: variable 'id' is not initialized [cppcoreguidelines-init-variables] | |
auto id = ch->id; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1870:7: warning: variable 'd' is not initialized [cppcoreguidelines-init-variables] | |
auto d = ch->desc; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1874:16: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (d != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1874:16: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (d != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1874:16: warning: statement should be inside braces [readability-braces-around-statements] | |
if (d != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1878:2: warning: this loop is infinite; none of its condition variables (d) are updated in the loop body [bugprone-infinite-loop] | |
for (d = descriptor_list; d != NULL; d = d->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1880:8: warning: variable 'tch' is not initialized [cppcoreguidelines-init-variables] | |
auto tch = d->original ? d->original : d->character; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1889:35: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_save(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1941:59: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (get_skill(ch, gsn_trail) > 0 && can_see(victim, ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1941:59: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (get_skill(ch, gsn_trail) > 0 && can_see(victim, ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:1941:59: warning: statement should be inside braces [readability-braces-around-statements] | |
if (get_skill(ch, gsn_trail) > 0 && can_see(victim, ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2004:27: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (can_see(master, ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2004:27: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (can_see(master, ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2004:27: warning: statement should be inside braces [readability-braces-around-statements] | |
if (can_see(master, ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2030:34: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(ch, gsn_trail)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2030:34: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(ch, gsn_trail)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2030:34: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(ch, gsn_trail)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2044:7: warning: variable 'pet' is not initialized [cppcoreguidelines-init-variables] | |
auto pet = ch->pet; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2075:13: warning: variable 'fch_next' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *fch_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2107:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char arg[MAX_INPUT_LENGTH], arg2[MAX_INPUT_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2162:13: warning: variable 'och_next' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *och_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2163:12: warning: variable 'och' is not initialized [cppcoreguidelines-init-variables] | |
for (auto och = ch->in_room->people; och != NULL; och = och_next) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2179:39: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!str_prefix(arg2, "disengage")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2179:39: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!str_prefix(arg2, "disengage")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2179:39: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!str_prefix(arg2, "disengage")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2186:89: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (str_prefix(arg2, "say") && str_prefix(arg2, "emote") && str_prefix(arg2, "pmote")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2186:89: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (str_prefix(arg2, "say") && str_prefix(arg2, "emote") && str_prefix(arg2, "pmote")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2186:89: warning: statement should be inside braces [readability-braces-around-statements] | |
if (str_prefix(arg2, "say") && str_prefix(arg2, "emote") && str_prefix(arg2, "pmote")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2204:3: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char buf[MAX_STRING_LENGTH], buf2[MAX_STRING_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2205:8: warning: variable 'leader' is not initialized [cppcoreguidelines-init-variables] | |
auto leader = ch->leader != NULL ? ch->leader : ch; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2210:3: warning: this loop is infinite; none of its condition variables (gch) are updated in the loop body [bugprone-infinite-loop] | |
for (auto gch = char_list; gch != NULL; gch = gch->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2216:11: warning: variable 'exp_tnl' is not initialized [cppcoreguidelines-init-variables] | |
auto exp_tnl = (gch->level * exp_per_level(gch) - gch->exp); | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2217:11: warning: variable 'epl' is not initialized [cppcoreguidelines-init-variables] | |
auto epl = pc_race_table[gch->race].xpadd + 1500; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2219:11: warning: variable 'exp_ltl' is not initialized [cppcoreguidelines-init-variables] | |
auto exp_ltl = (gch->level * exp_per_level(gch) - (gch->level - 1) * epl); | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2232:26: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (buf2[0] != '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2232:26: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (buf2[0] != '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2232:26: warning: statement should be inside braces [readability-braces-around-statements] | |
if (buf2[0] != '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2305:3: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
SET_BIT(af.bitvector, AFF_PERMANENT); | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4140:30: note: expanded from macro 'SET_BIT' | |
#define SET_BIT(var, bit) ((var[(int)bit/32]) |= ((long)pow(2,bit % 32))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2321:3: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
SET_BIT(af.bitvector, AFF_PERMANENT); | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4140:30: note: expanded from macro 'SET_BIT' | |
#define SET_BIT(var, bit) ((var[(int)bit/32]) |= ((long)pow(2,bit % 32))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2326:3: warning: this loop is infinite; none of its condition variables (vch) are updated in the loop body [bugprone-infinite-loop] | |
for (auto vch = char_list; vch; vch = vch->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2328:44: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (vch != ch && is_same_group(vch, ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2328:44: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (vch != ch && is_same_group(vch, ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2328:44: warning: statement should be inside braces [readability-braces-around-statements] | |
if (vch != ch && is_same_group(vch, ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2348:21: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
auto amount_gold = atoi(arg1); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2368:2: warning: this loop is infinite; none of its condition variables (gch) are updated in the loop body [bugprone-infinite-loop] | |
for (auto gch = ch->in_room->people; gch != NULL; gch = gch->next_in_room) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2368:12: warning: variable 'gch' is not initialized [cppcoreguidelines-init-variables] | |
for (auto gch = ch->in_room->people; gch != NULL; gch = gch->next_in_room) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2401:2: warning: this loop is infinite; none of its condition variables (gch) are updated in the loop body [bugprone-infinite-loop] | |
for (auto gch = ch->in_room->people; gch != NULL; gch = gch->next_in_room) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2401:12: warning: variable 'gch' is not initialized [cppcoreguidelines-init-variables] | |
for (auto gch = ch->in_room->people; gch != NULL; gch = gch->next_in_room) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2462:2: warning: this loop is infinite; none of its condition variables (gch) are updated in the loop body [bugprone-infinite-loop] | |
for (auto gch = char_list; gch != NULL; gch = gch->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2471:11: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (deaf) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2471:11: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (deaf) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2471:11: warning: statement should be inside braces [readability-braces-around-statements] | |
if (deaf) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2480:12: warning: variable 'speech' is not initialized [cppcoreguidelines-init-variables] | |
for (auto speech = mob->speech; speech; speech = speech->next) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2494:49: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (speech->first_line != speech->current_line) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2494:49: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (speech->first_line != speech->current_line) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2494:49: warning: statement should be inside braces [readability-braces-around-statements] | |
if (speech->first_line != speech->current_line) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2521:7: warning: variable 'copy' is not initialized [cppcoreguidelines-init-variables] | |
auto copy = palloc_string(line->text); | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2605:33: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (ach == NULL || bch == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2605:33: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (ach == NULL || bch == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2605:33: warning: statement should be inside braces [readability-braces-around-statements] | |
if (ach == NULL || bch == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2658:35: warning: use 'fopen' mode 'e' to set O_CLOEXEC [android-cloexec-fopen] | |
auto fp = fopen(PDEATH_LOG_FILE, "a"); | |
^~~ | |
"ae" | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2659:17: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (fp == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2659:17: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (fp == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2659:17: warning: statement should be inside braces [readability-braces-around-statements] | |
if (fp == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2705:32: warning: use 'fopen' mode 'e' to set O_CLOEXEC [android-cloexec-fopen] | |
auto fp = fopen(MOB_LOG_FILE, "a"); | |
^~~ | |
"ae" | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2706:16: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if(fp == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2706:16: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if(fp == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2706:16: warning: statement should be inside braces [readability-braces-around-statements] | |
if(fp == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_comm.c:2728:7: warning: variable 'escape' is not initialized [cppcoreguidelines-init-variables] | |
auto escape = ch->pcdata->host | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_comm.h:10:10: error: 'mysql.h' file not found [clang-diagnostic-error] | |
#include <mysql.h> | |
^ | |
/home/sgilliam/src/riftshadow/code/act_ente.c:39:7: warning: variable 'getRoomIndex' is not initialized [cppcoreguidelines-init-variables] | |
auto getRoomIndex = []() | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_ente.c:44:12: warning: variable 'room' is not initialized [cppcoreguidelines-init-variables] | |
for (auto room = getRoomIndex(); room != NULL; room = getRoomIndex()) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_ente.c:79:7: warning: variable 'old_room' is not initialized [cppcoreguidelines-init-variables] | |
auto old_room = ch->in_room; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_ente.c:81:7: warning: variable 'portal' is not initialized [cppcoreguidelines-init-variables] | |
auto portal = get_obj_list(ch, argument, ch->in_room->contents); | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_ente.c:113:7: warning: variable 'location' is not initialized [cppcoreguidelines-init-variables] | |
auto location = get_room_index(portal->value[3]); | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_ente.c:159:27: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (old_room == location) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_ente.c:159:27: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (old_room == location) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_ente.c:159:27: warning: statement should be inside braces [readability-braces-around-statements] | |
if (old_room == location) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_ente.c:164:2: warning: this loop is infinite; none of its condition variables (fch) are updated in the loop body [bugprone-infinite-loop] | |
for (auto fch = to_room->people; fch != NULL; fch = fch->next_in_room) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_ente.c:164:12: warning: variable 'fch' is not initialized [cppcoreguidelines-init-variables] | |
for (auto fch = to_room->people; fch != NULL; fch = fch->next_in_room) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_ente.c:167:3: warning: this loop is infinite; none of its condition variables (obj) are updated in the loop body [bugprone-infinite-loop] | |
for (auto obj = fch->carrying; obj != NULL; obj = obj->next_content) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_ente.c:167:13: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
for (auto obj = fch->carrying; obj != NULL; obj = obj->next_content) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_ente.c:178:2: warning: this loop is infinite; none of its condition variables (obj) are updated in the loop body [bugprone-infinite-loop] | |
for (auto obj = ch->carrying; obj != NULL; obj = obj->next_content) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_ente.c:178:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
for (auto obj = ch->carrying; obj != NULL; obj = obj->next_content) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_ente.c:187:2: warning: this loop is infinite; none of its condition variables (fch) are updated in the loop body [bugprone-infinite-loop] | |
for (auto fch = old_room->people; fch != NULL; fch = fch->next_in_room) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_ente.c:187:12: warning: variable 'fch' is not initialized [cppcoreguidelines-init-variables] | |
for (auto fch = old_room->people; fch != NULL; fch = fch->next_in_room) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:117:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_AFFECTED(obj, AFF_OBJ_BURNING)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4158:32: note: expanded from macro 'IS_AFFECTED' | |
#define IS_AFFECTED(ch, sn) (IS_SET(ch->affected_by, sn)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:117:40: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_AFFECTED(obj, AFF_OBJ_BURNING)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:117:40: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_AFFECTED(obj, AFF_OBJ_BURNING)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:117:40: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_AFFECTED(obj, AFF_OBJ_BURNING)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:120:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_OBJ_STAT(obj, ITEM_INVIS)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4210:34: note: expanded from macro 'IS_OBJ_STAT' | |
#define IS_OBJ_STAT(obj, stat) (IS_SET(obj->extra_flags, stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:120:35: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_OBJ_STAT(obj, ITEM_INVIS)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:120:35: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_OBJ_STAT(obj, ITEM_INVIS)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:120:35: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_OBJ_STAT(obj, ITEM_INVIS)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:132:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_OBJ_STAT(obj, ITEM_GLOW)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4210:34: note: expanded from macro 'IS_OBJ_STAT' | |
#define IS_OBJ_STAT(obj, stat) (IS_SET(obj->extra_flags, stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:132:34: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_OBJ_STAT(obj, ITEM_GLOW)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:132:34: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_OBJ_STAT(obj, ITEM_GLOW)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:132:34: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_OBJ_STAT(obj, ITEM_GLOW)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:135:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_OBJ_STAT(obj, ITEM_DARK)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4210:34: note: expanded from macro 'IS_OBJ_STAT' | |
#define IS_OBJ_STAT(obj, stat) (IS_SET(obj->extra_flags, stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:135:34: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_OBJ_STAT(obj, ITEM_DARK)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:135:34: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_OBJ_STAT(obj, ITEM_DARK)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:135:34: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_OBJ_STAT(obj, ITEM_DARK)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:138:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_OBJ_STAT(obj, ITEM_HUM)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4210:34: note: expanded from macro 'IS_OBJ_STAT' | |
#define IS_OBJ_STAT(obj, stat) (IS_SET(obj->extra_flags, stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:138:33: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_OBJ_STAT(obj, ITEM_HUM)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:138:33: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_OBJ_STAT(obj, ITEM_HUM)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:138:33: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_OBJ_STAT(obj, ITEM_HUM)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:153:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_OBJ_STAT(obj, ITEM_NOSHOW) && IS_IMMORTAL(ch)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4210:34: note: expanded from macro 'IS_OBJ_STAT' | |
#define IS_OBJ_STAT(obj, stat) (IS_SET(obj->extra_flags, stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:153:55: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_OBJ_STAT(obj, ITEM_NOSHOW) && IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:153:55: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_OBJ_STAT(obj, ITEM_NOSHOW) && IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:153:55: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_OBJ_STAT(obj, ITEM_NOSHOW) && IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:158:32: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (obj->short_descr != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:158:32: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (obj->short_descr != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:158:32: warning: statement should be inside braces [readability-braces-around-statements] | |
if (obj->short_descr != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:163:32: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (obj->description != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:163:32: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (obj->description != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:163:32: warning: statement should be inside braces [readability-braces-around-statements] | |
if (obj->description != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:182:7: warning: variable 'line' is not initialized [cppcoreguidelines-init-variables] | |
auto line = ch->lines; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:185:2: warning: this loop is infinite; none of its condition variables (obj) are updated in the loop body [bugprone-infinite-loop] | |
for (auto obj = list; obj != NULL; obj = obj->next_content) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:190:17: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (count == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:190:17: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (count == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:190:17: warning: statement should be inside braces [readability-braces-around-statements] | |
if (count == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:196:44: warning: narrowing conversion from 'unsigned long' to signed type 'long' is implementation-defined [bugprone-narrowing-conversions] | |
auto prgpstrShow = (char **)talloc_struct((count * sizeof(char *))); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:196:44: warning: narrowing conversion from 'unsigned long' to signed type 'long' is implementation-defined [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/act_info.c:197:39: warning: narrowing conversion from 'unsigned long' to signed type 'long' is implementation-defined [bugprone-narrowing-conversions] | |
auto prgnShow = (int *)talloc_struct((count * sizeof(int))); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:197:39: warning: narrowing conversion from 'unsigned long' to signed type 'long' is implementation-defined [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/act_info.c:320:43: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(victim, gsn_faerie_fire)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:320:43: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(victim, gsn_faerie_fire)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:320:43: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(victim, gsn_faerie_fire)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:323:45: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(victim, gsn_mana_sickness)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:323:45: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(victim, gsn_mana_sickness)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:323:45: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(victim, gsn_mana_sickness)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:326:45: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(victim, gsn_incandescense)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:326:45: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(victim, gsn_incandescense)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:326:45: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(victim, gsn_incandescense)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:329:41: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(victim, sn_faerie_fog)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:329:41: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(victim, sn_faerie_fog)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:329:41: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(victim, sn_faerie_fog)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:341:3: warning: this loop is infinite; none of its condition variables (af) are updated in the loop body [bugprone-infinite-loop] | |
for (auto af = victim->affected; af; af = af->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:341:13: warning: variable 'af' is not initialized [cppcoreguidelines-init-variables] | |
for (auto af = victim->affected; af; af = af->next) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:347:20: warning: 20 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (spellaffs >= 20) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:347:20: warning: 20 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:351:25: warning: 15 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (spellaffs >= 15) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:351:25: warning: 15 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:355:25: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (spellaffs >= 10) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:355:25: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:359:25: warning: 6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (spellaffs >= 6) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:359:25: warning: 6 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:383:23: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_EVIL(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:383:23: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_EVIL(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:383:23: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_EVIL(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:385:7: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:385:7: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:385:7: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:389:45: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(victim, gsn_cloak_of_mist)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:389:45: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(victim, gsn_cloak_of_mist)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:389:45: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(victim, gsn_cloak_of_mist)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:392:45: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(victim, gsn_sanguine_ward)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:392:45: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(victim, gsn_sanguine_ward)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:392:45: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(victim, gsn_sanguine_ward)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:395:37: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(victim, gsn_snare)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:395:37: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(victim, gsn_snare)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:395:37: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(victim, gsn_snare)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:398:45: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(victim, gsn_blade_barrier)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:398:45: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(victim, gsn_blade_barrier)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:398:45: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(victim, gsn_blade_barrier)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:401:43: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(victim, gsn_hold_person)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:401:43: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(victim, gsn_hold_person)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:401:43: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(victim, gsn_hold_person)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:404:7: warning: variable 'af' is not initialized [cppcoreguidelines-init-variables] | |
auto af = affect_find(victim->affected, gsn_creeping_tomb); | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:411:41: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(victim, gsn_earthfade)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:411:41: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(victim, gsn_earthfade)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:411:41: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(victim, gsn_earthfade)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:414:46: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(victim, gsn_ultradiffusion)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:414:46: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(victim, gsn_ultradiffusion)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:414:46: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(victim, gsn_ultradiffusion)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:417:41: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(victim, gsn_watermeld)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:417:41: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(victim, gsn_watermeld)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:417:41: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(victim, gsn_watermeld)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:420:48: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(victim, gsn_sphere_of_plasma)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:420:48: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(victim, gsn_sphere_of_plasma)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:420:48: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(victim, gsn_sphere_of_plasma)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:423:42: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(victim, gsn_deny_magic)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:423:42: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(victim, gsn_deny_magic)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:423:42: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(victim, gsn_deny_magic)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:585:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char buf[MAX_STRING_LENGTH], buf2[MAX_STRING_LENGTH], buf3[MAX_STRING_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_info.c:592:7: warning: variable 'percent' is not initialized [cppcoreguidelines-init-variables] | |
auto percent = victim->max_hit > 0 | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:651:3: warning: this loop is infinite; none of its condition variables (paf) are updated in the loop body [bugprone-infinite-loop] | |
for (auto paf = victim->affected; paf; paf = paf->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:651:13: warning: variable 'paf' is not initialized [cppcoreguidelines-init-variables] | |
for (auto paf = victim->affected; paf; paf = paf->next) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:667:62: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(victim, gsn_cloak_form) && !IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:667:62: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(victim, gsn_cloak_form) && !IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:667:62: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(victim, gsn_cloak_form) && !IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:675:14: warning: variable 'tObj' is not initialized [cppcoreguidelines-init-variables] | |
for (auto tObj = victim->carrying; tObj; tObj = tObj->next_content) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:680:10: warning: variable 'worn_over' is not initialized [cppcoreguidelines-init-variables] | |
auto worn_over = victim->carrying; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:692:19: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (worn_over) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:692:19: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (worn_over) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:692:19: warning: statement should be inside braces [readability-braces-around-statements] | |
if (worn_over) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:695:16: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:695:16: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:695:16: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:703:31: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (can_see_obj(ch, tObj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:703:31: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (can_see_obj(ch, tObj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:703:31: warning: statement should be inside braces [readability-braces-around-statements] | |
if (can_see_obj(ch, tObj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:705:9: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:705:9: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:705:9: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:736:8: warning: variable 'placeholder' is not initialized [cppcoreguidelines-init-variables] | |
auto placeholder = victim->pcdata->trophy; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:828:7: warning: variable 'percent' is not initialized [cppcoreguidelines-init-variables] | |
auto percent = victim->max_hit > 0 | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:902:7: warning: variable 'percent' is not initialized [cppcoreguidelines-init-variables] | |
auto percent = victim->max_hit > 0 | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:929:2: warning: this loop is infinite; none of its condition variables (rch) are updated in the loop body [bugprone-infinite-loop] | |
for (auto rch = list; rch != NULL; rch = rch->next_in_room) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:931:17: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (rch == ch) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:931:17: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (rch == ch) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:931:17: warning: statement should be inside braces [readability-braces-around-statements] | |
if (rch == ch) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:940:24: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (can_see(ch, rch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:940:24: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (can_see(ch, rch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:940:24: warning: statement should be inside braces [readability-braces-around-statements] | |
if (can_see(ch, rch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:958:8: warning: variable 'paf' is not initialized [cppcoreguidelines-init-variables] | |
auto paf = ch->in_room->area->affected; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:978:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char buf[100], arg[MAX_INPUT_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_info.c:978:11: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
char buf[100], arg[MAX_INPUT_LENGTH]; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:978:11: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:1002:15: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
auto lines = atoi(arg); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1010:14: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (lines < 10 || lines > 100) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1010:14: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:1010:28: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (lines < 10 || lines > 100) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1010:28: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:1024:38: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_socials(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1040:12: warning: 6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (col % 6 != 0) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1040:12: warning: 6 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:1040:19: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (col % 6 != 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1040:19: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (col % 6 != 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1040:19: warning: statement should be inside braces [readability-braces-around-statements] | |
if (col % 6 != 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1046:35: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_motd(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1051:36: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_imotd(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1056:36: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_rules(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1061:36: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_story(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1066:38: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_wizlist(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1072:39: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_autolist(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1081:7: warning: variable 'sendToChar' is not initialized [cppcoreguidelines-init-variables] | |
auto sendToChar = [](bool isSet, CHAR_DATA *ch) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:1199:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char arg1[MAX_STRING_LENGTH], arg2[MAX_STRING_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1232:40: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_autoabort(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1249:41: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_autoassist(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1266:39: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_autoexit(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1283:39: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_autogold(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1300:39: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_autoloot(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1317:38: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_autosac(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1334:40: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_autosplit(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1351:36: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_brief(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1365:38: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_compact(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1379:35: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_show(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1413:23: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1413:23: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1413:23: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1416:23: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1416:23: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1416:23: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1419:23: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1419:23: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1419:23: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1450:26: warning: 75 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (strlen(argument) > 75) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1450:26: warning: 75 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:1450:29: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (strlen(argument) > 75) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1450:29: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (strlen(argument) > 75) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1450:29: warning: statement should be inside braces [readability-braces-around-statements] | |
if (strlen(argument) > 75) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1451:13: warning: 75 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
argument[75] = '\0'; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1451:13: warning: 75 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:1456:29: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (str_suffix("%c", buf)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1456:29: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (str_suffix("%c", buf)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1456:29: warning: statement should be inside braces [readability-braces-around-statements] | |
if (str_suffix("%c", buf)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1467:38: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_combine(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1481:39: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_nofollow(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1505:39: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_nosummon(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1558:23: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!check_blind(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1558:23: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!check_blind(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1558:23: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!check_blind(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1603:23: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!check_blind(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1603:23: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!check_blind(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1603:23: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!check_blind(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1634:29: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!room->alt_description) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1634:29: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!room->alt_description) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1634:29: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!room->alt_description) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1637:69: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (room->alt_description_cond == AD_COND_NIGHT && sun == SUN_DARK) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1637:69: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (room->alt_description_cond == AD_COND_NIGHT && sun == SUN_DARK) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1637:69: warning: statement should be inside braces [readability-braces-around-statements] | |
if (room->alt_description_cond == AD_COND_NIGHT && sun == SUN_DARK) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1645:29: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!room->alt_description) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1645:29: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!room->alt_description) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1645:29: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!room->alt_description) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1648:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (show_altdesc(room)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1648:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (show_altdesc(room)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1648:25: warning: statement should be inside braces [readability-braces-around-statements] | |
if (show_altdesc(room)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1656:29: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!room->alt_description) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1656:29: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!room->alt_description) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1656:29: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!room->alt_description) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1659:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (show_altdesc(room)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1659:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (show_altdesc(room)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1659:25: warning: statement should be inside braces [readability-braces-around-statements] | |
if (show_altdesc(room)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1668:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char *pdesc, *direction; | |
^~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1668:8: warning: variable 'pdesc' is not initialized [cppcoreguidelines-init-variables] | |
char *pdesc, *direction; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_info.c:1668:16: warning: variable 'direction' is not initialized [cppcoreguidelines-init-variables] | |
char *pdesc, *direction; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_info.c:1669:6: warning: variable 'door' is not initialized [cppcoreguidelines-init-variables] | |
int door; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:1670:6: warning: variable 'i' is not initialized [cppcoreguidelines-init-variables] | |
int i; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:1687:23: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!check_blind(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1687:23: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!check_blind(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1687:23: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!check_blind(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1731:15: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
for (auto victim = ch->in_room->people; victim; victim = victim->next_in_room) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:1815:14: warning: variable 'raf' is not initialized [cppcoreguidelines-init-variables] | |
for (auto raf = ch->in_room->affected; raf != NULL; raf = raf->next) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:1827:5: warning: do not use 'else' after 'break' [readability-else-after-return] | |
else if (raf->type == gsn_riptide && raf->owner == ch && raf->location == APPLY_ROOM_NONE && | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_info.c:1842:9: warning: variable 'af' is not initialized [cppcoreguidelines-init-variables] | |
auto af = affect_find(ch->affected, gsn_mark_of_wrath); | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:2021:27: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_IMMORTAL(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2021:27: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_IMMORTAL(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2021:27: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_IMMORTAL(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2029:7: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
auto obj = ch->in_room->contents; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:2032:29: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!can_see_obj(ch, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2032:29: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!can_see_obj(ch, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2032:29: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!can_see_obj(ch, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2075:29: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!can_see_obj(ch, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2075:29: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!can_see_obj(ch, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2075:29: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!can_see_obj(ch, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2136:12: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2136:12: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2136:12: warning: statement should be inside braces [readability-braces-around-statements] | |
if (found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2162:12: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2162:12: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2162:12: warning: statement should be inside braces [readability-braces-around-statements] | |
if (found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2167:18: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (count == 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2167:18: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (count == 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2167:18: warning: statement should be inside braces [readability-braces-around-statements] | |
if (count == 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2169:7: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2169:7: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2169:7: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2198:10: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
door = 5; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2198:10: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:2210:7: warning: variable 'pexit' is not initialized [cppcoreguidelines-init-variables] | |
auto pexit = ch->in_room->exit[door]; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:2250:9: warning: variable 'in_room' is not initialized [cppcoreguidelines-init-variables] | |
auto in_room = ch->in_room; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:2280:21: warning: redundant 'dir_name' declaration [readability-redundant-declaration] | |
extern char *const dir_name[]; | |
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/fight.h:42:20: note: previously declared here | |
extern char *const dir_name[]; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2282:23: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!check_blind(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2282:23: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!check_blind(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2282:23: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!check_blind(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2296:12: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (fAuto) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2296:12: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (fAuto) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2296:12: warning: statement should be inside braces [readability-braces-around-statements] | |
if (fAuto) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2298:27: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2298:27: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2298:27: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2300:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2300:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2300:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2304:30: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
for (auto door = 0; door <= 5; door++) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2304:30: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:2306:8: warning: variable 'pexit' is not initialized [cppcoreguidelines-init-variables] | |
auto pexit = ch->in_room->exit[door]; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:2332:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2332:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2332:25: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2336:9: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2336:9: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2336:9: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2342:13: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2342:13: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2342:13: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2345:12: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (fAuto) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2345:12: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (fAuto) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2345:12: warning: statement should be inside braces [readability-braces-around-statements] | |
if (fAuto) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2351:36: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_worth(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2370:36: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_score(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2392:7: warning: variable 'tmp' is not initialized [cppcoreguidelines-init-variables] | |
auto tmp = get_hours(ch) / ch->pcdata->death_time * 100.001f; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:2393:11: warning: redundant cast to the same type [google-readability-casting] | |
auto i = (int)tmp; | |
^~~~~ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2394:8: warning: variable 'state' is not initialized [cppcoreguidelines-init-variables] | |
char *state; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_info.c:2396:10: warning: 15 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (i < 15) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2396:10: warning: 15 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:2396:13: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (i < 15) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2396:13: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (i < 15) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2396:13: warning: statement should be inside braces [readability-braces-around-statements] | |
if (i < 15) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2398:15: warning: 40 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (i < 40) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2398:15: warning: 40 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:2398:18: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (i < 40) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2398:18: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (i < 40) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2398:18: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (i < 40) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2400:15: warning: 65 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (i < 65) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2400:15: warning: 65 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:2400:18: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (i < 65) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2400:18: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (i < 65) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2400:18: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (i < 65) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2402:15: warning: 90 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (i < 90) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2402:15: warning: 90 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:2402:18: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (i < 90) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2402:18: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (i < 90) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2402:18: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (i < 90) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2404:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2404:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2404:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2431:2: warning: if with identical then and else branches [bugprone-branch-clone] | |
if (ch->Class()->GetIndex() == CLASS_WARRIOR || ch->pcdata->special > 0) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2439:2: note: else branch starts here | |
else | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2532:9: warning: variable 'temp' is not initialized [cppcoreguidelines-init-variables] | |
char *temp; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_info.c:2667:38: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_affects(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2678:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char buf[MAX_STRING_LENGTH], buf2[MAX_STRING_LENGTH], buf3[MAX_STRING_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2679:2: warning: this loop is infinite; none of its condition variables (paf) are updated in the loop body [bugprone-infinite-loop] | |
for (auto paf = ch->affected; paf != NULL; paf = paf->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2679:12: warning: variable 'paf' is not initialized [cppcoreguidelines-init-variables] | |
for (auto paf = ch->affected; paf != NULL; paf = paf->next) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:2720:9: warning: variable 'showdur' is not initialized [cppcoreguidelines-init-variables] | |
auto showdur = paf->duration + 1; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:2755:35: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_time(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2759:8: warning: variable 'suf' is not initialized [cppcoreguidelines-init-variables] | |
char *suf; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_info.c:2763:23: warning: 20 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (day > 4 && day < 20) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2763:23: warning: 20 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:2763:26: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (day > 4 && day < 20) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2763:26: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (day > 4 && day < 20) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2763:26: warning: statement should be inside braces [readability-braces-around-statements] | |
if (day > 4 && day < 20) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2764:3: warning: repeated branch in conditional chain [bugprone-branch-clone] | |
suf = "th"; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2764:13: note: end of the original | |
suf = "th"; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2772:3: note: clone 1 starts here | |
suf = "th"; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2765:17: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (day % 10 == 1) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2765:17: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:2765:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (day % 10 == 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2765:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (day % 10 == 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2765:25: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (day % 10 == 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2767:17: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (day % 10 == 2) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2767:17: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:2767:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (day % 10 == 2) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2767:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (day % 10 == 2) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2767:25: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (day % 10 == 2) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2769:17: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (day % 10 == 3) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2769:17: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:2769:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (day % 10 == 3) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2769:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (day % 10 == 3) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2769:25: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (day % 10 == 3) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2771:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2771:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2771:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2776:21: warning: 12 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
(time_info.hour % 12 == 0) ? 12 : time_info.hour % 12, | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2776:21: warning: 12 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:2776:32: warning: 12 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
(time_info.hour % 12 == 0) ? 12 : time_info.hour % 12, | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2776:32: warning: 12 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:2776:54: warning: 12 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
(time_info.hour % 12 == 0) ? 12 : time_info.hour % 12, | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2776:54: warning: 12 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:2777:21: warning: 12 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
time_info.hour >= 12 ? "pm" : "am", | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2777:21: warning: 12 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:2778:18: warning: 6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
day_name[day % 6], | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2778:18: warning: 6 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:2799:38: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_weather(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2801:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char buf[MAX_STRING_LENGTH], buf2[MAX_STRING_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2832:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char argall[MAX_INPUT_LENGTH], argone[MAX_INPUT_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2834:26: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (argument[0] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2834:26: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (argument[0] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2834:26: warning: statement should be inside braces [readability-braces-around-statements] | |
if (argument[0] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2843:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (argall[0] != '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2843:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (argall[0] != '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2843:25: warning: statement should be inside braces [readability-braces-around-statements] | |
if (argall[0] != '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2852:8: warning: variable 'level' is not initialized [cppcoreguidelines-init-variables] | |
auto level = (pHelp->level < 0) ? -1 * pHelp->level - 1 : pHelp->level; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:2863:14: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2863:14: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2863:14: warning: statement should be inside braces [readability-braces-around-statements] | |
if (found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2888:13: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2888:13: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2888:13: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2890:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2890:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2890:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2910:2: warning: this loop is infinite; none of its condition variables (d) are updated in the loop body [bugprone-infinite-loop] | |
for (auto d = descriptor_list; d != NULL; d = d->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2912:15: warning: variable 'class_name' is not initialized [cppcoreguidelines-init-variables] | |
char const *class_name; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_info.c:2913:15: warning: variable 'imm_lvl' is not initialized [cppcoreguidelines-init-variables] | |
char const *imm_lvl; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_info.c:2918:8: warning: variable 'wch' is not initialized [cppcoreguidelines-init-variables] | |
auto wch = (d->original != NULL) ? d->original : d->character; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:2920:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!can_see(ch, wch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2920:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!can_see(ch, wch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2920:25: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!can_see(ch, wch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2978:4: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char buf[MAX_STRING_LENGTH], rbuf[MAX_STRING_LENGTH], disp[MAX_STRING_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2983:26: warning: 52 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (get_trust(ch) >= 52) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2983:26: warning: 52 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:2983:29: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (get_trust(ch) >= 52) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2983:29: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (get_trust(ch) >= 52) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2983:29: warning: statement should be inside braces [readability-braces-around-statements] | |
if (get_trust(ch) >= 52) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2985:9: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2985:9: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:2985:9: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3007:31: warning: 52 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (get_trust(wch) >= 52 && !IS_IMMORTAL(ch)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3007:31: warning: 52 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:3008:4: warning: repeated branch in conditional chain [bugprone-branch-clone] | |
{ | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3026:5: note: end of the original | |
} | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3028:4: note: clone 1 starts here | |
{ | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3012:26: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_IMMORTAL(wch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3012:26: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_IMMORTAL(wch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3012:26: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_IMMORTAL(wch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3014:9: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3014:9: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3014:9: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3032:26: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_IMMORTAL(wch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3032:26: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_IMMORTAL(wch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3032:26: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_IMMORTAL(wch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3034:9: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3034:9: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3034:9: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3077:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int fAlign = 0, fEthos = 0; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3118:3: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char arg[MAX_STRING_LENGTH], arg2[500]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3118:37: warning: 500 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
char arg[MAX_STRING_LENGTH], arg2[500]; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3118:37: warning: 500 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:3121:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (arg[0] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3121:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (arg[0] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3121:22: warning: statement should be inside braces [readability-braces-around-statements] | |
if (arg[0] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3126:19: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
auto tempnum = atoi(arg) ; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3138:15: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
tempnum = atoi(arg2); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3206:10: warning: variable 'iClass' is not initialized [cppcoreguidelines-init-variables] | |
auto iClass = CClass::Lookup(arg); | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:3254:2: warning: this loop is infinite; none of its condition variables (d) are updated in the loop body [bugprone-infinite-loop] | |
for (auto d = descriptor_list; d != NULL; d = d->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3263:8: warning: variable 'wch' is not initialized [cppcoreguidelines-init-variables] | |
auto wch = d->original != NULL | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:3267:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!can_see(ch, wch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3267:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!can_see(ch, wch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3267:25: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!can_see(ch, wch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3270:8: warning: variable 'fOChar' is not initialized [cppcoreguidelines-init-variables] | |
auto fOChar = wch->pcdata->old && !IS_IMMORTAL(ch); | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:3274:4: warning: missing username/bug in TODO [google-readability-todo] | |
// TODO: anc is currently unused, delete section? | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
// TODO(sgilliam): anc is currently unused, delete section? | |
/home/sgilliam/src/riftshadow/code/act_info.c:3309:58: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(wch, gsn_disguise) && !IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3309:58: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(wch, gsn_disguise) && !IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3309:58: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(wch, gsn_disguise) && !IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3315:15: warning: variable 'class_name' is not initialized [cppcoreguidelines-init-variables] | |
char const *class_name; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_info.c:3316:15: warning: variable 'imm_lvl' is not initialized [cppcoreguidelines-init-variables] | |
char const *imm_lvl; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_info.c:3367:26: warning: 52 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
strcpy(rbuf, trust >= 52 ? " " : ""); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3367:26: warning: 52 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:3389:30: warning: 52 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (get_trust(wch) >= 52 && !IS_IMMORTAL(ch)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3389:30: warning: 52 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:3390:3: warning: repeated branch in conditional chain [bugprone-branch-clone] | |
{ | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3413:4: note: end of the original | |
} | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3415:3: note: clone 1 starts here | |
{ | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3454:36: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_count(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3459:2: warning: this loop is infinite; none of its condition variables (d) are updated in the loop body [bugprone-infinite-loop] | |
for (auto d = descriptor_list; d != NULL; d = d->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3470:42: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if ((count + not_seen) >= count_data[0]) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3470:42: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if ((count + not_seen) >= count_data[0]) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3470:42: warning: statement should be inside braces [readability-braces-around-statements] | |
if ((count + not_seen) >= count_data[0]) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3478:40: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_inventory(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3484:40: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_equipment(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3493:4: warning: this loop is infinite; none of its condition variables (tObj) are updated in the loop body [bugprone-infinite-loop] | |
for (auto tObj = ch->carrying; tObj; tObj = tObj->next_content) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3493:14: warning: variable 'tObj' is not initialized [cppcoreguidelines-init-variables] | |
for (auto tObj = ch->carrying; tObj; tObj = tObj->next_content) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:3497:6: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char buf[MAX_STRING_LENGTH], buf2[MAX_STRING_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3502:32: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (can_see_obj(ch, tObj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3502:32: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (can_see_obj(ch, tObj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3502:32: warning: statement should be inside braces [readability-braces-around-statements] | |
if (can_see_obj(ch, tObj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3504:10: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3504:10: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3504:10: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3514:45: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (iWear == WEAR_COSMETIC || obj == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3514:45: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (iWear == WEAR_COSMETIC || obj == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3514:45: warning: statement should be inside braces [readability-braces-around-statements] | |
if (iWear == WEAR_COSMETIC || obj == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3519:28: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (can_see_obj(ch, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3519:28: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (can_see_obj(ch, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3519:28: warning: statement should be inside braces [readability-braces-around-statements] | |
if (can_see_obj(ch, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3521:7: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3521:7: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3521:7: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3528:13: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3528:13: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3528:13: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3552:12: warning: variable 'obj2' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj2; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_info.c:3616:24: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (value1 == value2) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3616:24: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (value1 == value2) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3616:24: warning: statement should be inside braces [readability-braces-around-statements] | |
if (value1 == value2) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3618:28: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (value1 > value2) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3618:28: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (value1 > value2) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3618:28: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (value1 > value2) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3620:7: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3620:7: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3620:7: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3629:17: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (ch == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3629:17: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (ch == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3629:17: warning: statement should be inside braces [readability-braces-around-statements] | |
if (ch == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3659:3: warning: this loop is infinite; none of its condition variables (d) are updated in the loop body [bugprone-infinite-loop] | |
for (auto d = descriptor_list; d; d = d->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3661:9: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
auto victim = d->character; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:3689:14: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3689:14: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3689:14: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3694:3: warning: this loop is infinite; none of its condition variables (d) are updated in the loop body [bugprone-infinite-loop] | |
for (auto d = descriptor_list; d; d = d->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3696:9: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
auto victim = d->character; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:3722:14: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3722:14: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3722:14: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3751:14: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3751:14: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3751:14: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3773:7: warning: variable 'diff' is not initialized [cppcoreguidelines-init-variables] | |
auto diff = victim->level - ch->level; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:3774:15: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (diff <= -10) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3774:15: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:3774:18: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (diff <= -10) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3774:18: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (diff <= -10) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3774:18: warning: statement should be inside braces [readability-braces-around-statements] | |
if (diff <= -10) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3776:20: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (diff <= -5) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3776:20: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:3776:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (diff <= -5) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3776:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (diff <= -5) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3776:22: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (diff <= -5) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3778:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (diff <= -2) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3778:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (diff <= -2) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3778:22: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (diff <= -2) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3780:21: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (diff <= 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3780:21: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (diff <= 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3780:21: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (diff <= 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3782:21: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (diff <= 4) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3782:21: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (diff <= 4) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3782:21: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (diff <= 4) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3784:19: warning: 9 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (diff <= 9) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3784:19: warning: 9 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:3784:21: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (diff <= 9) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3784:21: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (diff <= 9) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3784:21: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (diff <= 9) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3786:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3786:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3786:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3790:15: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (diff > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3790:15: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (diff > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3790:15: warning: statement should be inside braces [readability-braces-around-statements] | |
if (diff > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3792:21: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (diff == 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3792:21: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (diff == 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3792:21: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (diff == 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3794:17: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (!diff) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3794:17: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (!diff) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3794:17: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (!diff) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3796:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (diff == -1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3796:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (diff == -1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3796:22: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (diff == -1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3798:21: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (diff < -1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3798:21: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (diff < -1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3798:21: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (diff < -1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3847:44: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (*argument == '\'' || *argument == '"') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3847:44: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (*argument == '\'' || *argument == '"') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3847:44: warning: statement should be inside braces [readability-braces-around-statements] | |
if (*argument == '\'' || *argument == '"') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3848:10: warning: 'signed char' to 'int' conversion; consider casting to 'unsigned char' first. [bugprone-signed-char-misuse] | |
cEnd = *argument++; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3888:25: warning: 45 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (strlen(argument) > 45) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3888:25: warning: 45 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:3888:28: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (strlen(argument) > 45) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3888:28: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (strlen(argument) > 45) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3888:28: warning: statement should be inside braces [readability-braces-around-statements] | |
if (strlen(argument) > 45) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3889:12: warning: 45 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
argument[45] = '\0'; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3889:12: warning: 45 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:3891:32: warning: use 'fopen' mode 'e' to set O_CLOEXEC [android-cloexec-fopen] | |
auto fp = fopen(GOD_LOG_FILE, "a"); | |
^~~ | |
"ae" | |
/home/sgilliam/src/riftshadow/code/act_info.c:3952:44: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (*argument == '\'' || *argument == '"') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3952:44: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (*argument == '\'' || *argument == '"') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3952:44: warning: statement should be inside braces [readability-braces-around-statements] | |
if (*argument == '\'' || *argument == '"') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:3953:10: warning: 'signed char' to 'int' conversion; consider casting to 'unsigned char' first. [bugprone-signed-char-misuse] | |
cEnd = *argument++; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4002:25: warning: 45 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (strlen(argument) > 45) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4002:25: warning: 45 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4002:28: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (strlen(argument) > 45) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4002:28: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (strlen(argument) > 45) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4002:28: warning: statement should be inside braces [readability-braces-around-statements] | |
if (strlen(argument) > 45) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4003:12: warning: 45 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
argument[45] = '\0'; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4003:12: warning: 45 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4005:32: warning: use 'fopen' mode 'e' to set O_CLOEXEC [android-cloexec-fopen] | |
auto fp = fopen(GOD_LOG_FILE, "a"); | |
^~~ | |
"ae" | |
/home/sgilliam/src/riftshadow/code/act_info.c:4083:19: warning: narrowing conversion from 'unsigned long' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions] | |
for (auto len = strlen(buf); len > 0; len--) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4083:19: warning: narrowing conversion from 'unsigned long' to signed type 'int' is implementation-defined [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4089:18: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (len > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4089:18: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (len > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4089:18: warning: statement should be inside braces [readability-braces-around-statements] | |
if (len > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4131:37: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_report(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4133:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char buf[MAX_STRING_LENGTH], buf2[MAX_STRING_LENGTH], buf3[MAX_STRING_LENGTH], buf4[MAX_STRING_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4135:7: warning: variable 'percenta' is not initialized [cppcoreguidelines-init-variables] | |
auto percenta = ch->max_hit == 0 ? 0 : (ch->hit * 100) / ch->max_hit; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:4136:7: warning: variable 'percentb' is not initialized [cppcoreguidelines-init-variables] | |
auto percentb = ch->max_mana == 0 ? 0 : (ch->mana * 100) / ch->max_mana; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:4137:7: warning: variable 'percentc' is not initialized [cppcoreguidelines-init-variables] | |
auto percentc = ch->max_move == 0 ? 0 : (ch->move * 100) / ch->max_move; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:4139:18: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (percenta >= 100) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4139:18: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4139:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (percenta >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4139:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (percenta >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4139:22: warning: statement should be inside braces [readability-braces-around-statements] | |
if (percenta >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4141:22: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percenta < 100 && percenta >= 80) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4141:22: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4141:41: warning: 80 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percenta < 100 && percenta >= 80) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4141:41: warning: 80 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4141:44: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (percenta < 100 && percenta >= 80) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4141:44: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (percenta < 100 && percenta >= 80) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4141:44: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (percenta < 100 && percenta >= 80) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4143:22: warning: 80 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percenta < 80 && percenta >= 60) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4143:22: warning: 80 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4143:40: warning: 60 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percenta < 80 && percenta >= 60) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4143:40: warning: 60 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4143:43: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (percenta < 80 && percenta >= 60) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4143:43: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (percenta < 80 && percenta >= 60) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4143:43: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (percenta < 80 && percenta >= 60) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4145:22: warning: 60 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percenta < 60 && percenta >= 40) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4145:22: warning: 60 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4145:40: warning: 40 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percenta < 60 && percenta >= 40) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4145:40: warning: 40 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4145:43: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (percenta < 60 && percenta >= 40) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4145:43: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (percenta < 60 && percenta >= 40) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4145:43: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (percenta < 60 && percenta >= 40) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4147:22: warning: 40 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percenta < 40 && percenta >= 20) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4147:22: warning: 40 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4147:40: warning: 20 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percenta < 40 && percenta >= 20) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4147:40: warning: 20 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4147:43: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (percenta < 40 && percenta >= 20) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4147:43: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (percenta < 40 && percenta >= 20) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4147:43: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (percenta < 40 && percenta >= 20) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4149:22: warning: 20 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percenta < 20 && percenta > 0) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4149:22: warning: 20 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4149:41: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (percenta < 20 && percenta > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4149:41: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (percenta < 20 && percenta > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4149:41: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (percenta < 20 && percenta > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4151:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4151:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4151:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4154:18: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (percentb >= 100) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4154:18: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4154:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (percentb >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4154:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (percentb >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4154:22: warning: statement should be inside braces [readability-braces-around-statements] | |
if (percentb >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4156:22: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percentb < 100 && percentb >= 80) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4156:22: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4156:41: warning: 80 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percentb < 100 && percentb >= 80) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4156:41: warning: 80 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4156:44: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (percentb < 100 && percentb >= 80) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4156:44: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (percentb < 100 && percentb >= 80) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4156:44: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (percentb < 100 && percentb >= 80) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4158:22: warning: 80 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percentb < 80 && percentb >= 60) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4158:22: warning: 80 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4158:40: warning: 60 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percentb < 80 && percentb >= 60) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4158:40: warning: 60 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4158:43: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (percentb < 80 && percentb >= 60) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4158:43: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (percentb < 80 && percentb >= 60) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4158:43: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (percentb < 80 && percentb >= 60) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4160:22: warning: 60 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percentb < 60 && percentb >= 40) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4160:22: warning: 60 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4160:40: warning: 40 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percentb < 60 && percentb >= 40) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4160:40: warning: 40 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4160:43: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (percentb < 60 && percentb >= 40) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4160:43: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (percentb < 60 && percentb >= 40) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4160:43: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (percentb < 60 && percentb >= 40) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4162:22: warning: 40 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percentb < 40 && percentb >= 20) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4162:22: warning: 40 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4162:40: warning: 20 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percentb < 40 && percentb >= 20) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4162:40: warning: 20 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4162:43: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (percentb < 40 && percentb >= 20) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4162:43: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (percentb < 40 && percentb >= 20) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4162:43: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (percentb < 40 && percentb >= 20) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4164:22: warning: 20 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percentb < 20 && percentb > 0) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4164:22: warning: 20 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4164:41: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (percentb < 20 && percentb > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4164:41: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (percentb < 20 && percentb > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4164:41: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (percentb < 20 && percentb > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4166:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4166:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4166:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4169:18: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (percentc >= 100) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4169:18: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4169:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (percentc >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4169:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (percentc >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4169:22: warning: statement should be inside braces [readability-braces-around-statements] | |
if (percentc >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4171:22: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percentc < 100 && percentc >= 80) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4171:22: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4171:41: warning: 80 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percentc < 100 && percentc >= 80) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4171:41: warning: 80 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4171:44: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (percentc < 100 && percentc >= 80) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4171:44: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (percentc < 100 && percentc >= 80) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4171:44: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (percentc < 100 && percentc >= 80) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4173:22: warning: 80 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percentc < 80 && percentc >= 60) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4173:22: warning: 80 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4173:40: warning: 60 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percentc < 80 && percentc >= 60) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4173:40: warning: 60 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4173:43: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (percentc < 80 && percentc >= 60) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4173:43: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (percentc < 80 && percentc >= 60) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4173:43: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (percentc < 80 && percentc >= 60) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4175:22: warning: 60 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percentc < 60 && percentc >= 40) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4175:22: warning: 60 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4175:40: warning: 40 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percentc < 60 && percentc >= 40) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4175:40: warning: 40 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4175:43: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (percentc < 60 && percentc >= 40) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4175:43: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (percentc < 60 && percentc >= 40) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4175:43: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (percentc < 60 && percentc >= 40) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4177:22: warning: 40 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percentc < 40 && percentc >= 20) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4177:22: warning: 40 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4177:40: warning: 20 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percentc < 40 && percentc >= 20) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4177:40: warning: 20 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4177:43: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (percentc < 40 && percentc >= 20) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4177:43: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (percentc < 40 && percentc >= 20) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4177:43: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (percentc < 40 && percentc >= 20) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4179:22: warning: 20 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (percentc < 20 && percentc > 0) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4179:22: warning: 20 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4179:41: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (percentc < 20 && percentc > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4179:41: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (percentc < 20 && percentc > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4179:41: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (percentc < 20 && percentc > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4181:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4181:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4181:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4214:37: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (skill_table[sn].name == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4214:37: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (skill_table[sn].name == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4214:37: warning: statement should be inside braces [readability-braces-around-statements] | |
if (skill_table[sn].name == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4239:34: warning: statement should be inside braces [google-readability-braces-around-statements] | |
|| sn == gsn_tactician_skill) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4239:34: warning: statement should be inside braces [hicpp-braces-around-statements] | |
|| sn == gsn_tactician_skill) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4239:34: warning: statement should be inside braces [readability-braces-around-statements] | |
|| sn == gsn_tactician_skill) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4253:24: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (++col % 3 == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4253:24: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (++col % 3 == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4253:24: warning: statement should be inside braces [readability-braces-around-statements] | |
if (++col % 3 == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4258:20: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (col % 3 != 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4258:20: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (col % 3 != 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4258:20: warning: statement should be inside braces [readability-braces-around-statements] | |
if (col % 3 != 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4264:42: warning: 58 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (IS_IMMORTAL(ch) && get_trust(ch) > 58) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4264:42: warning: 58 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4264:45: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_IMMORTAL(ch) && get_trust(ch) > 58) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4264:45: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_IMMORTAL(ch) && get_trust(ch) > 58) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4264:45: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_IMMORTAL(ch) && get_trust(ch) > 58) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4279:7: warning: variable 'mob' is not initialized [cppcoreguidelines-init-variables] | |
auto mob = ch->in_room->people; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:4332:7: warning: variable 'adept' is not initialized [cppcoreguidelines-init-variables] | |
auto adept = IS_NPC(ch) ? 100 : 75; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:4342:14: warning: 80 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
auto mcap = 80; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4342:14: warning: 80 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4347:15: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (base < 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4347:15: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (base < 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4347:15: warning: statement should be inside braces [readability-braces-around-statements] | |
if (base < 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4385:7: warning: variable 'wimpy' is not initialized [cppcoreguidelines-init-variables] | |
auto wimpy = arg[0] == '\0' | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:4475:18: warning: 40 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
WAIT_STATE(ch, 40); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4475:18: warning: 40 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4480:21: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (strlen(arg2) < 5) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4480:21: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4489:7: warning: variable 'pwdnew' is not initialized [cppcoreguidelines-init-variables] | |
auto pwdnew = crypt(arg2, ch->name); | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:4519:2: warning: missing username/bug in TODO [google-readability-todo] | |
// TODO: the following will always be false since arg hasnt been given a value | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
// TODO(sgilliam): the following will always be false since arg hasnt been given a value | |
/home/sgilliam/src/riftshadow/code/act_info.c:4521:28: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!str_cmp(arg, "self")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4521:28: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!str_cmp(arg, "self")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4521:28: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!str_cmp(arg, "self")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4526:12: warning: variable 'rch' is not initialized [cppcoreguidelines-init-variables] | |
for (auto rch = ch->in_room->people; rch != NULL; rch = rch->next_in_room) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:4528:27: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (argument[0] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4528:27: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (argument[0] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4528:27: warning: statement should be inside braces [readability-braces-around-statements] | |
if (argument[0] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4531:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!can_see(ch, rch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4531:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!can_see(ch, rch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4531:25: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!can_see(ch, rch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4539:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (++count == number) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4539:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (++count == number) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4539:25: warning: statement should be inside braces [readability-braces-around-statements] | |
if (++count == number) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4548:2: warning: missing username/bug in TODO [google-readability-todo] | |
// TODO: the following will always be false since arg hasnt been given a value | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
// TODO(sgilliam): the following will always be false since arg hasnt been given a value | |
/home/sgilliam/src/riftshadow/code/act_info.c:4550:28: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!str_cmp(arg, "self")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4550:28: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!str_cmp(arg, "self")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4550:28: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!str_cmp(arg, "self")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4557:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!can_see(ch, rch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4557:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!can_see(ch, rch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4557:25: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!can_see(ch, rch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4565:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (++count == number) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4565:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (++count == number) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4565:25: warning: statement should be inside braces [readability-braces-around-statements] | |
if (++count == number) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4572:38: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_balance(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4574:7: warning: variable 'banker' is not initialized [cppcoreguidelines-init-variables] | |
auto banker = ch->in_room->people; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:4587:11: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
char buf[100]; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4587:11: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4599:18: warning: variable 'pIndex' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_INDEX_DATA *pIndex; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_info.c:4601:7: warning: variable 'banker' is not initialized [cppcoreguidelines-init-variables] | |
auto banker = ch->in_room->people; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:4624:17: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!bFound) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4624:17: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!bFound) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4624:17: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!bFound) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4638:49: warning: .1 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
UMAX(1, pIndex->cost + number_range((int)(-.1 * pIndex->cost), (int)(.1 * pIndex->cost)))); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4638:49: warning: .1 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4638:75: warning: .1 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
UMAX(1, pIndex->cost + number_range((int)(-.1 * pIndex->cost), (int)(.1 * pIndex->cost)))); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4638:75: warning: .1 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4643:15: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!bFound) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4643:15: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!bFound) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4643:15: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!bFound) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4649:16: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
auto amount = atoi(arg); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4658:8: warning: variable 'i' is not initialized [cppcoreguidelines-init-variables] | |
auto i = ch->pcdata->deposited_items[amount - 1]; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:4670:13: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!pObj) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4670:13: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!pObj) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4670:13: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!pObj) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4722:7: warning: variable 'banker' is not initialized [cppcoreguidelines-init-variables] | |
auto banker = ch->in_room->people; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:4753:17: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
auto amount = atoi(arg); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4808:7: warning: variable 'charges' is not initialized [cppcoreguidelines-init-variables] | |
auto charges = UMAX(deposited->level * 15, deposited->cost / 8); | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:4830:38: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_records(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4844:2: warning: this loop is infinite; none of its condition variables (victim) are updated in the loop body [bugprone-infinite-loop] | |
for (auto victim = char_list; victim != NULL; victim = victim->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4857:17: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (count == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4857:17: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (count == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4857:17: warning: statement should be inside braces [readability-braces-around-statements] | |
if (count == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4883:2: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4906:38: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
char object_name[MAX_INPUT_LENGTH + 100]; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4906:38: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4934:7: warning: variable 'lorebonus' is not initialized [cppcoreguidelines-init-variables] | |
auto lorebonus = ch->Profs()->GetProf("forgotten lore"); | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:4945:63: warning: 15 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (number_percent() < get_skill(ch, gsn_lore) + lorebonus * 15) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4945:63: warning: 15 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:4954:21: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (lorebonus > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4954:21: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (lorebonus > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:4954:21: warning: statement should be inside braces [readability-braces-around-statements] | |
if (lorebonus > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5052:3: warning: this loop is infinite; none of its condition variables (app) are updated in the loop body [bugprone-infinite-loop] | |
for (auto app = obj->apply; app; app = app->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5052:13: warning: variable 'app' is not initialized [cppcoreguidelines-init-variables] | |
for (auto app = obj->apply; app; app = app->next) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:5082:26: warning: parameter 'ch' is unused [misc-unused-parameters] | |
bool isNewbie(CHAR_DATA *ch) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5095:34: warning: use 'fopen' mode 'e' to set O_CLOEXEC [android-cloexec-fopen] | |
auto fp = fopen(DEBUG_LOG_FILE, "a"); | |
^~~ | |
"ae" | |
/home/sgilliam/src/riftshadow/code/act_info.c:5146:2: warning: this loop is infinite; none of its condition variables (vch) are updated in the loop body [bugprone-infinite-loop] | |
for (auto vch = victim->in_room->people; vch != NULL; vch = vch->next_in_room) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5146:12: warning: variable 'vch' is not initialized [cppcoreguidelines-init-variables] | |
for (auto vch = victim->in_room->people; vch != NULL; vch = vch->next_in_room) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_info.c:5148:21: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (vch == victim) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5148:21: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (vch == victim) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5148:21: warning: statement should be inside braces [readability-braces-around-statements] | |
if (vch == victim) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5154:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!can_see(ch, vch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5154:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!can_see(ch, vch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5154:25: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!can_see(ch, vch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5157:34: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_same_group(vch, victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5157:34: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_same_group(vch, victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5157:34: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_same_group(vch, victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5165:19: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (foundIR == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5165:19: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (foundIR == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5165:19: warning: statement should be inside braces [readability-braces-around-statements] | |
if (foundIR == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5207:41: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_trustgroup(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5221:41: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_trustcabal(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5273:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char buf[MAX_BUF], arg1[MAX_BUF], obuf[MAX_BUF]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5284:67: warning: 52 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (!strcmp(arg1, "show") && IS_IMMORTAL(ch) && get_trust(ch) > 52) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5284:67: warning: 52 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_info.c:5326:20: warning: narrowing conversion from 'unsigned long' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions] | |
for (auto len = strlen(obuf); len > 0; len--) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5326:20: warning: narrowing conversion from 'unsigned long' to signed type 'int' is implementation-defined [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/act_info.c:5328:27: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (obuf[len] != '\r') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5328:27: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (obuf[len] != '\r') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5328:27: warning: statement should be inside braces [readability-braces-around-statements] | |
if (obuf[len] != '\r') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5333:18: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (len > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5333:18: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (len > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5333:18: warning: statement should be inside braces [readability-braces-around-statements] | |
if (len > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5387:4: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_info.c:5421:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char buf[MAX_BUF], obuf[MAX_BUF]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_move.c:70:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:70:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:70:22: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:108:14: warning: 60 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.level = 60; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:108:14: warning: 60 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:109:17: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.duration = 5; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:109:17: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:126:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
AFFECT_DATA *imaf, *paf, cvaf, cvaf2; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_move.c:126:15: warning: variable 'imaf' is not initialized [cppcoreguidelines-init-variables] | |
AFFECT_DATA *imaf, *paf, cvaf, cvaf2; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_move.c:126:22: warning: variable 'paf' is not initialized [cppcoreguidelines-init-variables] | |
AFFECT_DATA *imaf, *paf, cvaf, cvaf2; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_move.c:127:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int distance, oppdir, dam, twchance, ss_chance; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_move.c:127:6: warning: variable 'distance' is not initialized [cppcoreguidelines-init-variables] | |
int distance, oppdir, dam, twchance, ss_chance; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:127:16: warning: variable 'oppdir' is not initialized [cppcoreguidelines-init-variables] | |
int distance, oppdir, dam, twchance, ss_chance; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:127:24: warning: variable 'dam' is not initialized [cppcoreguidelines-init-variables] | |
int distance, oppdir, dam, twchance, ss_chance; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:127:29: warning: variable 'twchance' is not initialized [cppcoreguidelines-init-variables] | |
int distance, oppdir, dam, twchance, ss_chance; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:127:39: warning: variable 'ss_chance' is not initialized [cppcoreguidelines-init-variables] | |
int distance, oppdir, dam, twchance, ss_chance; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:128:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
float move, wait; | |
^~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_move.c:128:8: warning: variable 'move' is not initialized [cppcoreguidelines-init-variables] | |
float move, wait; | |
^ | |
= NAN | |
/home/sgilliam/src/riftshadow/code/act_move.c:128:14: warning: variable 'wait' is not initialized [cppcoreguidelines-init-variables] | |
float move, wait; | |
^ | |
= NAN | |
/home/sgilliam/src/riftshadow/code/act_move.c:130:25: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (door < 0 || door > 5) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:130:25: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:139:7: warning: variable 'invnum' is not initialized [cppcoreguidelines-init-variables] | |
auto invnum = ch->in_room->vnum; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:143:8: warning: variable 'raf' is not initialized [cppcoreguidelines-init-variables] | |
auto raf = ch->in_room->affected; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:164:27: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
door = number_range(0, 5); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:164:27: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:172:7: warning: variable 'in_room' is not initialized [cppcoreguidelines-init-variables] | |
auto in_room = ch->in_room; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:174:7: warning: variable 'pexit' is not initialized [cppcoreguidelines-init-variables] | |
auto pexit = in_room->exit[door]; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:181:7: warning: variable 'to_room' is not initialized [cppcoreguidelines-init-variables] | |
auto to_room = pexit->u1.to_room; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:196:24: warning: 1000 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
for (auto i = 0; i < 1000; i++) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:196:24: warning: 1000 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:198:29: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
auto d0 = number_range(0,5); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:198:29: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:267:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
auto found = false, swimmer = false, mountaineer = false; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_move.c:281:4: warning: this loop is infinite; none of its condition variables (obj) are updated in the loop body [bugprone-infinite-loop] | |
for (auto obj = ch->carrying; obj != NULL; obj = obj->next_content) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:281:14: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
for (auto obj = ch->carrying; obj != NULL; obj = obj->next_content) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:292:4: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else if (!found) // swimmer | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_move.c:305:33: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (check_barred(ch, to_room)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:305:33: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (check_barred(ch, to_room)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:305:33: warning: statement should be inside braces [readability-braces-around-statements] | |
if (check_barred(ch, to_room)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:311:64: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (number_percent() > ((get_curr_stat(ch, STAT_STR) * 4) - 5 * paf->modifier)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:311:64: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:330:13: warning: variable 'moveprog' is not initialized [cppcoreguidelines-init-variables] | |
for (auto moveprog = ch->in_room->people; moveprog; moveprog = moveprog->next_in_room) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:350:12: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions] | |
move *= .75; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:350:12: warning: .75 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:350:12: warning: narrowing conversion from 'double' to 'float' [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/act_move.c:350:12: warning: .75 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:357:12: warning: 6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
wait += 6; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:357:12: warning: 6 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:378:14: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!well) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:378:14: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!well) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:378:14: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!well) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:388:54: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected_room(gravroom, gsn_gravity_well)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:388:54: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected_room(gravroom, gsn_gravity_well)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:388:54: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected_room(gravroom, gsn_gravity_well)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:395:12: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions] | |
move = (32 * move) / (pow(2, distance)); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:395:12: warning: narrowing conversion from 'double' to 'float' [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/act_move.c:395:13: warning: 32 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
move = (32 * move) / (pow(2, distance)); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:395:13: warning: 32 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:399:39: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(ch, gsn_travelease)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:399:39: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(ch, gsn_travelease)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:399:39: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(ch, gsn_travelease)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:404:12: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions] | |
move *= 1.5; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:404:12: warning: 1.5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:404:12: warning: narrowing conversion from 'double' to 'float' [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/act_move.c:404:12: warning: 1.5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:411:12: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions] | |
move *= 1.75; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:411:12: warning: 1.75 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:411:12: warning: narrowing conversion from 'double' to 'float' [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/act_move.c:411:12: warning: 1.75 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:412:12: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions] | |
wait *= 1.75; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:412:12: warning: 1.75 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:412:12: warning: narrowing conversion from 'double' to 'float' [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/act_move.c:412:12: warning: 1.75 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:415:40: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(ch, gsn_hunters_net)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:415:40: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(ch, gsn_hunters_net)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:415:40: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(ch, gsn_hunters_net)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:431:9: warning: variable 'pval' is not initialized [cppcoreguidelines-init-variables] | |
auto pval = ch->Profs()->GetProf(psn_swimming); | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:432:23: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions] | |
move *= pval > 2 ? pval > 5 ? .6 : 1.2 : 2; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:432:23: warning: narrowing conversion from 'double' to 'float' [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/act_move.c:432:30: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
move *= pval > 2 ? pval > 5 ? .6 : 1.2 : 2; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:432:30: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:432:34: warning: .6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
move *= pval > 2 ? pval > 5 ? .6 : 1.2 : 2; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:432:34: warning: .6 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:432:39: warning: 1.2 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
move *= pval > 2 ? pval > 5 ? .6 : 1.2 : 2; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:432:39: warning: 1.2 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:432:45: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions] | |
move *= pval > 2 ? pval > 5 ? .6 : 1.2 : 2; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:432:45: warning: narrowing conversion from 'double' to 'float' [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/act_move.c:433:23: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions] | |
wait *= pval > 3 ? pval > 7 ? .5 : 1.2 : 2; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:433:23: warning: narrowing conversion from 'double' to 'float' [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/act_move.c:433:30: warning: 7 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
wait *= pval > 3 ? pval > 7 ? .5 : 1.2 : 2; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:433:30: warning: 7 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:433:34: warning: .5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
wait *= pval > 3 ? pval > 7 ? .5 : 1.2 : 2; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:433:34: warning: .5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:433:39: warning: 1.2 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
wait *= pval > 3 ? pval > 7 ? .5 : 1.2 : 2; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:433:39: warning: 1.2 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:433:45: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions] | |
wait *= pval > 3 ? pval > 7 ? .5 : 1.2 : 2; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:433:45: warning: narrowing conversion from 'double' to 'float' [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/act_move.c:453:23: warning: 53 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (get_trust(ch) > 53) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:453:23: warning: 53 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:453:26: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (get_trust(ch) > 53) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:453:26: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (get_trust(ch) > 53) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:453:26: warning: statement should be inside braces [readability-braces-around-statements] | |
if (get_trust(ch) > 53) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:465:36: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(ch, gsn_outflank)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:465:36: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(ch, gsn_outflank)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:465:36: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(ch, gsn_outflank)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:493:34: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(ch, gsn_sneak)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:493:34: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(ch, gsn_sneak)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:493:34: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(ch, gsn_sneak)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:521:38: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(ch, gsn_door_bash)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:521:38: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(ch, gsn_door_bash)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:521:38: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(ch, gsn_door_bash)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:523:7: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:523:7: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:523:7: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:534:24: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (mountaineer) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:534:24: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (mountaineer) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:534:24: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (mountaineer) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:568:3: warning: this loop is infinite; none of its condition variables (d) are updated in the loop body [bugprone-infinite-loop] | |
for (auto d = descriptor_list; d; d = d->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:570:9: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
auto victim = d->character; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:581:30: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!can_see(ch, victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:581:30: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!can_see(ch, victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:581:30: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!can_see(ch, victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:582:62: warning: .85 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
ss_chance = (int)((get_skill(victim, gsn_shadowsense) * .85) / 2); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:582:62: warning: .85 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:583:9: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:583:9: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:583:9: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:584:61: warning: .85 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
ss_chance = (int)(get_skill(victim, gsn_shadowsense) * .85); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:584:61: warning: .85 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:620:38: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(ch, gsn_door_bash)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:620:38: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(ch, gsn_door_bash)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:620:38: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(ch, gsn_door_bash)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:622:7: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:622:7: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:622:7: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:638:27: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (imaf && imaf->owner) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:638:27: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (imaf && imaf->owner) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:638:27: warning: statement should be inside braces [readability-braces-around-statements] | |
if (imaf && imaf->owner) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:649:8: warning: variable 'raf' is not initialized [cppcoreguidelines-init-variables] | |
auto raf = in_room->affected; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:656:8: warning: variable 'raf_two' is not initialized [cppcoreguidelines-init-variables] | |
auto raf_two = to_room->affected; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:672:46: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
twchance = (get_skill(ch, gsn_tripwire) / 5); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:672:46: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:673:77: warning: 30 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
twchance += (get_curr_stat(ch, STAT_DEX) + get_curr_stat(ch, STAT_INT) - 30) * 2; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:673:77: warning: 30 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:691:13: warning: variable 'raf' is not initialized [cppcoreguidelines-init-variables] | |
for (auto raf = to_room->affected; raf != NULL; raf = raf->next) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:698:22: warning: variable 'riptideroom' is not initialized [cppcoreguidelines-init-variables] | |
ROOM_INDEX_DATA *riptideroom; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_move.c:699:5: warning: this loop is infinite; none of its condition variables (room) are updated in the loop body [bugprone-infinite-loop] | |
for (auto room = top_affected_room; room; room = room->aff_next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:703:7: warning: this loop is infinite; none of its condition variables (raf_two) are updated in the loop body [bugprone-infinite-loop] | |
for (auto raf_two = room->affected; raf_two != NULL; raf_two = raf_two->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:703:17: warning: variable 'raf_two' is not initialized [cppcoreguidelines-init-variables] | |
for (auto raf_two = room->affected; raf_two != NULL; raf_two = raf_two->next) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:737:8: warning: variable 'raf' is not initialized [cppcoreguidelines-init-variables] | |
auto raf = to_room->affected; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:753:28: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (number_percent() <= (5 * (get_curr_stat(ch, STAT_DEX) - 15))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:753:28: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:753:63: warning: 15 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (number_percent() <= (5 * (get_curr_stat(ch, STAT_DEX) - 15))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:753:63: warning: 15 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:778:8: warning: variable 'raf' is not initialized [cppcoreguidelines-init-variables] | |
auto raf = to_room->affected; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:788:43: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(ch, gsn_ultradiffusion)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:788:43: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(ch, gsn_ultradiffusion)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:788:43: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(ch, gsn_ultradiffusion)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:820:8: warning: variable 'raf' is not initialized [cppcoreguidelines-init-variables] | |
auto raf = to_room->affected; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:830:43: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(ch, gsn_ultradiffusion)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:830:43: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(ch, gsn_ultradiffusion)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:830:43: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(ch, gsn_ultradiffusion)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:838:27: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (number_percent() > (10 * get_curr_stat(ch, STAT_DEX) - 175)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:838:27: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:838:62: warning: 175 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (number_percent() > (10 * get_curr_stat(ch, STAT_DEX) - 175)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:838:62: warning: 175 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:863:8: warning: variable 'raf' is not initialized [cppcoreguidelines-init-variables] | |
auto raf = to_room->affected; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:870:23: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:870:23: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:870:23: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:893:14: warning: variable 'paf' is not initialized [cppcoreguidelines-init-variables] | |
for (auto paf = ch->affected; paf != NULL; paf = paf->next) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:915:5: warning: switch has 2 consecutive identical branches [bugprone-branch-clone] | |
case 1: | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:920:11: note: last of these clones ends here | |
break; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:924:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
SET_BIT(cvaf2.bitvector, AFF_POISON); | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4140:30: note: expanded from macro 'SET_BIT' | |
#define SET_BIT(var, bit) ((var[(int)bit/32]) |= ((long)pow(2,bit % 32))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:928:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
SET_BIT(cvaf2.bitvector, AFF_POISON); | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4140:30: note: expanded from macro 'SET_BIT' | |
#define SET_BIT(var, bit) ((var[(int)bit/32]) |= ((long)pow(2,bit % 32))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:930:10: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
case 5: | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:930:10: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:933:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
SET_BIT(cvaf2.bitvector, AFF_POISON); | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4140:30: note: expanded from macro 'SET_BIT' | |
#define SET_BIT(var, bit) ((var[(int)bit/32]) |= ((long)pow(2,bit % 32))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:934:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
SET_BIT(cvaf2.bitvector, AFF_BLIND); | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4140:30: note: expanded from macro 'SET_BIT' | |
#define SET_BIT(var, bit) ((var[(int)bit/32]) |= ((long)pow(2,bit % 32))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:938:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
SET_BIT(cvaf2.bitvector, AFF_POISON); | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4140:30: note: expanded from macro 'SET_BIT' | |
#define SET_BIT(var, bit) ((var[(int)bit/32]) |= ((long)pow(2,bit % 32))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:939:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
SET_BIT(cvaf2.bitvector, AFF_BLIND); | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4140:30: note: expanded from macro 'SET_BIT' | |
#define SET_BIT(var, bit) ((var[(int)bit/32]) |= ((long)pow(2,bit % 32))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:943:27: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (paf->modifier >= 3) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:943:27: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (paf->modifier >= 3) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:943:27: warning: statement should be inside braces [readability-braces-around-statements] | |
if (paf->modifier >= 3) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:958:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (in_room == to_room) /* no circular follows */ | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:958:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (in_room == to_room) /* no circular follows */ | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:958:25: warning: statement should be inside braces [readability-braces-around-statements] | |
if (in_room == to_room) /* no circular follows */ | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:967:10: warning: variable 'td' is not initialized [cppcoreguidelines-init-variables] | |
auto td = to_room->exit[i]->u1.to_room; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:981:3: warning: this loop is infinite; none of its condition variables (rune) are updated in the loop body [bugprone-infinite-loop] | |
while (rune != NULL) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:991:2: warning: this loop is infinite; none of its condition variables (fch) are updated in the loop body [bugprone-infinite-loop] | |
for (auto fch = to_room->people; fch != NULL; fch = fch->next_in_room) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:991:12: warning: variable 'fch' is not initialized [cppcoreguidelines-init-variables] | |
for (auto fch = to_room->people; fch != NULL; fch = fch->next_in_room) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:997:13: warning: variable 'fch_next' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *fch_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_move.c:998:12: warning: variable 'fch' is not initialized [cppcoreguidelines-init-variables] | |
for (auto fch = to_room->people; fch != NULL; fch = fch_next) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:1002:3: warning: this loop is infinite; none of its condition variables (room_has_pc, obj) are updated in the loop body [bugprone-infinite-loop] | |
for (auto obj = fch->carrying; room_has_pc && obj != NULL; obj = obj->next_content) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1002:13: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
for (auto obj = fch->carrying; room_has_pc && obj != NULL; obj = obj->next_content) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:1028:2: warning: this loop is infinite; none of its condition variables (room_has_pc, obj) are updated in the loop body [bugprone-infinite-loop] | |
for (auto obj = ch->carrying; room_has_pc && obj != NULL; obj = obj->next_content) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1028:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
for (auto obj = ch->carrying; room_has_pc && obj != NULL; obj = obj->next_content) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:1039:13: warning: variable 'fch' is not initialized [cppcoreguidelines-init-variables] | |
for (auto fch = in_room->people; fch != NULL; fch = fch_next) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:1063:2: warning: this loop is infinite; none of its condition variables (obj) are updated in the loop body [bugprone-infinite-loop] | |
for (auto obj = ch->in_room->contents; obj != NULL; obj = obj->next_content) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1063:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
for (auto obj = ch->in_room->contents; obj != NULL; obj = obj->next_content) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:1081:23: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (i == MAX_TRACKS) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1081:23: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (i == MAX_TRACKS) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1081:23: warning: statement should be inside braces [readability-braces-around-statements] | |
if (i == MAX_TRACKS) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1108:36: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_north(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1119:35: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_east(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1130:36: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_south(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1141:35: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_west(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1152:33: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_up(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1163:35: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_down(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1176:19: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!trap->armed) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1176:19: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!trap->armed) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1176:19: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!trap->armed) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1187:3: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1208:14: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!victim) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1208:14: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!victim) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1208:14: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!victim) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1211:14: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!victim) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1211:14: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!victim) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1211:14: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!victim) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1218:53: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
damage_new(victim, victim, (dice(trap->quality * 10, 7)), TYPE_UNDEFINED, DAM_PIERCE, true, HIT_UNBLOCKABLE, HIT_NOADD, HIT_NOMULT, "the razor-tipped dart*"); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1218:53: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:1218:57: warning: 7 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
damage_new(victim, victim, (dice(trap->quality * 10, 7)), TYPE_UNDEFINED, DAM_PIERCE, true, HIT_UNBLOCKABLE, HIT_NOADD, HIT_NOMULT, "the razor-tipped dart*"); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1218:57: warning: 7 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:1221:53: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
damage_new(victim, victim, (dice(trap->quality * 5, 7)), TYPE_UNDEFINED, DAM_PIERCE, true, HIT_UNBLOCKABLE, HIT_NOADD, HIT_NOMULT, "the poison-tipped dart*"); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1221:53: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:1221:56: warning: 7 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
damage_new(victim, victim, (dice(trap->quality * 5, 7)), TYPE_UNDEFINED, DAM_PIERCE, true, HIT_UNBLOCKABLE, HIT_NOADD, HIT_NOMULT, "the poison-tipped dart*"); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1221:56: warning: 7 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:1222:20: warning: 8 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (saves_spell(8 * trap->quality, victim, DAM_POISON)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1222:20: warning: 8 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:1238:31: warning: 7 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.level = trap->quality * 7; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1238:31: warning: 7 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:1240:19: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.modifier = -5; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1240:19: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:1243:4: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
SET_BIT(af.bitvector, AFF_POISON); | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4140:30: note: expanded from macro 'SET_BIT' | |
#define SET_BIT(var, bit) ((var[(int)bit/32]) |= ((long)pow(2,bit % 32))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1248:4: warning: this loop is infinite; none of its condition variables (vch) are updated in the loop body [bugprone-infinite-loop] | |
for (auto vch = room->people; vch; vch = vch->next_in_room) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1250:47: warning: 9 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
damage_new(vch, vch, dice(trap->quality * 9, 9), TYPE_UNDEFINED, DAM_FIRE, true, HIT_UNBLOCKABLE, HIT_NOADD, HIT_NOMULT, "the fireball*"); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1250:47: warning: 9 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:1250:50: warning: 9 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
damage_new(vch, vch, dice(trap->quality * 9, 9), TYPE_UNDEFINED, DAM_FIRE, true, HIT_UNBLOCKABLE, HIT_NOADD, HIT_NOMULT, "the fireball*"); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1250:50: warning: 9 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:1255:64: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
auto dam = damage_new(victim, victim, dice(trap->quality * 10, 9), TYPE_UNDEFINED, DAM_LIGHTNING, true, HIT_UNBLOCKABLE, HIT_NOADD, HIT_NOMULT, "the lightning bolt*"); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1255:64: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:1255:68: warning: 9 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
auto dam = damage_new(victim, victim, dice(trap->quality * 10, 9), TYPE_UNDEFINED, DAM_LIGHTNING, true, HIT_UNBLOCKABLE, HIT_NOADD, HIT_NOMULT, "the lightning bolt*"); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1255:68: warning: 9 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:1257:25: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (trap->quality > 5) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1257:25: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:1257:27: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (trap->quality > 5) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1257:27: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (trap->quality > 5) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1257:27: warning: statement should be inside braces [readability-braces-around-statements] | |
if (trap->quality > 5) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1258:43: warning: 7 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
shock_effect(victim, trap->quality * 7, dam, TARGET_CHAR); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1258:43: warning: 7 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:1263:32: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
auto mod = trap->quality < 5 | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1263:32: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:1264:30: warning: 6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
? (trap->quality * 3) - 6 | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1264:30: warning: 6 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:1267:5: warning: this loop is infinite; none of its condition variables (vch) are updated in the loop body [bugprone-infinite-loop] | |
for (auto vch = room->people; vch; vch = vch->next_in_room) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1274:6: warning: do not use 'else' after 'continue' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1283:34: warning: 6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.level = trap->quality * 6; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1283:34: warning: 6 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:1297:55: warning: 7 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
spell_acid_stream(gsn_acid_stream, trap->quality * 7, victim, victim, TARGET_CHAR); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1297:55: warning: 7 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:1300:4: warning: this loop is infinite; none of its condition variables (vch) are updated in the loop body [bugprone-infinite-loop] | |
for (auto vch = room->people; vch; vch = vch->next_in_room) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1305:5: warning: repeated branch in conditional chain [bugprone-branch-clone] | |
{ | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1307:6: note: end of the original | |
} | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1309:5: note: clone 1 starts here | |
{ | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1308:31: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (trap->quality == 5) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1308:31: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:1331:3: warning: switch has 3 consecutive identical branches [bugprone-branch-clone] | |
case TRAP_PIT: | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1336:9: note: last of these clones ends here | |
break; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1342:13: warning: variable 'pexit' is not initialized [cppcoreguidelines-init-variables] | |
EXIT_DATA *pexit; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_move.c:1343:6: warning: variable 'door' is not initialized [cppcoreguidelines-init-variables] | |
int door; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:1367:10: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
door = 5; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1367:10: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:1371:26: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
for (door = 0; door <= 5; door++) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1371:26: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:1376:8: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
&& IS_SET(pexit->exit_info, EX_ISDOOR) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1396:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (!IS_SET(pexit->exit_info, EX_ISDOOR)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1492:15: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (door < 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1492:15: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (door < 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1492:15: warning: statement should be inside braces [readability-braces-around-statements] | |
if (door < 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1496:7: warning: variable 'pexit' is not initialized [cppcoreguidelines-init-variables] | |
auto pexit = ch->in_room->exit[door]; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:1528:7: warning: variable 'to_room' is not initialized [cppcoreguidelines-init-variables] | |
auto to_room = pexit->u1.to_room; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:1531:8: warning: variable 'pexit_rev' is not initialized [cppcoreguidelines-init-variables] | |
auto pexit_rev = to_room->exit[rev_dir[door]]; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:1536:4: warning: this loop is infinite; none of its condition variables (rch) are updated in the loop body [bugprone-infinite-loop] | |
for (auto rch = to_room->people; rch != NULL; rch = rch->next_in_room) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1536:14: warning: variable 'rch' is not initialized [cppcoreguidelines-init-variables] | |
for (auto rch = to_room->people; rch != NULL; rch = rch->next_in_room) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:1612:15: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (door < 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1612:15: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (door < 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1612:15: warning: statement should be inside braces [readability-braces-around-statements] | |
if (door < 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1616:7: warning: variable 'pexit' is not initialized [cppcoreguidelines-init-variables] | |
auto pexit = ch->in_room->exit[door]; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:1637:7: warning: variable 'to_room' is not initialized [cppcoreguidelines-init-variables] | |
auto to_room = pexit->u1.to_room; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:1640:8: warning: variable 'pexit_rev' is not initialized [cppcoreguidelines-init-variables] | |
auto pexit_rev = to_room->exit[rev_dir[door]]; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:1643:15: warning: variable 'rch' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *rch; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_move.c:1656:13: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
for (auto *obj = ch->carrying; obj != NULL; obj = obj->next_content) | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_move.c:1756:15: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (door < 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1756:15: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (door < 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1756:15: warning: statement should be inside braces [readability-braces-around-statements] | |
if (door < 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1760:7: warning: variable 'pexit' is not initialized [cppcoreguidelines-init-variables] | |
auto pexit = ch->in_room->exit[door]; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:1790:7: warning: variable 'to_room' is not initialized [cppcoreguidelines-init-variables] | |
auto to_room = pexit->u1.to_room; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:1791:7: warning: variable 'pexit_rev' is not initialized [cppcoreguidelines-init-variables] | |
auto pexit_rev = to_room->exit[rev_dir[door]]; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:1890:15: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (door < 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1890:15: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (door < 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1890:15: warning: statement should be inside braces [readability-braces-around-statements] | |
if (door < 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:1894:7: warning: variable 'pexit' is not initialized [cppcoreguidelines-init-variables] | |
auto pexit = ch->in_room->exit[door]; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:1925:7: warning: variable 'to_room' is not initialized [cppcoreguidelines-init-variables] | |
auto to_room = pexit->u1.to_room; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:1926:7: warning: variable 'pexit_rev' is not initialized [cppcoreguidelines-init-variables] | |
auto pexit_rev = to_room->exit[rev_dir[door]]; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:1947:12: warning: variable 'gch' is not initialized [cppcoreguidelines-init-variables] | |
for (auto gch = ch->in_room->people; gch; gch = gch->next_in_room) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:2041:15: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (door < 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2041:15: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (door < 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2041:15: warning: statement should be inside braces [readability-braces-around-statements] | |
if (door < 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2045:7: warning: variable 'pexit' is not initialized [cppcoreguidelines-init-variables] | |
auto pexit = ch->in_room->exit[door]; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:2077:7: warning: variable 'to_room' is not initialized [cppcoreguidelines-init-variables] | |
auto to_room = pexit->u1.to_room; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:2078:7: warning: variable 'pexit_rev' is not initialized [cppcoreguidelines-init-variables] | |
auto pexit_rev = to_room->exit[rev_dir[door]]; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:2085:36: warning: pointer parameter 'argument' can be pointer to const [readability-non-const-parameter] | |
void do_stand(CHAR_DATA *ch, char *argument) | |
^ | |
const | |
/home/sgilliam/src/riftshadow/code/act_move.c:2105:20: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
|| (!IS_SET_OLD(obj->value[2], STAND_AT) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2106:20: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
&& !IS_SET_OLD(obj->value[2], STAND_ON) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2107:20: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
&& !IS_SET_OLD(obj->value[2], STAND_IN))) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2196:35: warning: pointer parameter 'argument' can be pointer to const [readability-non-const-parameter] | |
void do_rest(CHAR_DATA *ch, char *argument) | |
^ | |
const | |
/home/sgilliam/src/riftshadow/code/act_move.c:2230:20: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
|| (!IS_SET_OLD(obj->value[2], REST_ON) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2231:20: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
&& !IS_SET_OLD(obj->value[2], REST_IN) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2232:20: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
&& !IS_SET_OLD(obj->value[2], LOUNGE_ON) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2233:20: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
&& !IS_SET_OLD(obj->value[2], REST_AT))) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2355:34: warning: pointer parameter 'argument' can be pointer to const [readability-non-const-parameter] | |
void do_sit(CHAR_DATA *ch, char *argument) | |
^ | |
const | |
/home/sgilliam/src/riftshadow/code/act_move.c:2390:17: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
(!IS_SET_OLD(obj->value[2], SIT_ON) && !IS_SET_OLD(obj->value[2], SIT_IN) && | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2390:55: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
(!IS_SET_OLD(obj->value[2], SIT_ON) && !IS_SET_OLD(obj->value[2], SIT_IN) && | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2391:17: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
!IS_SET_OLD(obj->value[2], SIT_AT))) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2612:36: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_sneak(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2658:2: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
SET_BIT(af.bitvector, AFF_SNEAK); | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4140:30: note: expanded from macro 'SET_BIT' | |
#define SET_BIT(var, bit) ((var[(int)bit/32]) |= ((long)pow(2,bit % 32))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2809:43: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_acute_vision(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2848:2: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
SET_BIT(af.bitvector, AFF_DETECT_CAMO); | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4140:30: note: expanded from macro 'SET_BIT' | |
#define SET_BIT(var, bit) ((var[(int)bit/32]) |= ((long)pow(2,bit % 32))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2856:2: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] | |
return; | |
~~~~~~~~^~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2859:35: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_camp(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2898:16: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.duration = 5; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2898:16: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:2910:41: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_camouflage(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2937:18: warning: 8 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
WAIT_STATE(ch, 8); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2937:18: warning: 8 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:2943:18: warning: 8 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
WAIT_STATE(ch, 8); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2943:18: warning: 8 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:2993:15: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
direction = 5; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:2993:15: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:3016:14: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
auto wait = 100 - chance; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3016:14: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:3020:35: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_hide(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3064:41: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void un_camouflage(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3075:40: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void un_blackjack(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3077:37: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(ch, gsn_blackjack)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3077:37: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(ch, gsn_blackjack)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3077:37: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(ch, gsn_blackjack)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3081:39: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void un_strangle(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3083:36: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(ch, gsn_strangle)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3083:36: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(ch, gsn_strangle)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3083:36: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(ch, gsn_strangle)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3087:35: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void un_hide(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3098:36: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void un_invis(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3112:36: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void un_sneak(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3134:40: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void un_earthfade(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3136:38: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!is_affected(ch, gsn_earthfade)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3136:38: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!is_affected(ch, gsn_earthfade)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3136:38: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!is_affected(ch, gsn_earthfade)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3147:44: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void un_blade_barrier(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3149:42: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!is_affected(ch, gsn_blade_barrier)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3149:42: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!is_affected(ch, gsn_blade_barrier)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3149:42: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!is_affected(ch, gsn_blade_barrier)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3160:40: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void un_watermeld(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3162:38: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!is_affected(ch, gsn_watermeld)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3162:38: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!is_affected(ch, gsn_watermeld)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3162:38: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!is_affected(ch, gsn_watermeld)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3170:37: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void un_shroud(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3178:38: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_visible(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3190:37: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_recall(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3206:7: warning: variable 'location' is not initialized [cppcoreguidelines-init-variables] | |
auto location = get_room_index(hometown_table[ch->hometown].recall); | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:3222:7: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
auto victim = ch->fighting; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:3228:26: warning: 80 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (number_percent() < 80 * skill / 100) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3228:26: warning: 80 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:3228:39: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (number_percent() < 80 * skill / 100) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3228:39: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:3230:41: warning: 6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
check_improve(ch, gsn_recall, false, 6); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3230:41: warning: 6 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:3272:7: warning: variable 'mob' is not initialized [cppcoreguidelines-init-variables] | |
auto mob = ch->in_room->people; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:3322:2: warning: repeated branch in conditional chain [bugprone-branch-clone] | |
{ | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3324:3: note: end of the original | |
} | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3326:2: note: clone 1 starts here | |
{ | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3435:2: warning: this loop is infinite; none of its condition variables (check) are updated in the loop body [bugprone-infinite-loop] | |
for (auto check = char_list; check != NULL; check = check->next) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3466:7: warning: variable 'a_level' is not initialized [cppcoreguidelines-init-variables] | |
auto a_level = ch->level; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:3499:16: warning: 24 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.duration = 24; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3499:16: warning: 24 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:3616:7: warning: variable 'pRoomIndex' is not initialized [cppcoreguidelines-init-variables] | |
auto pRoomIndex = ch->in_room; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:3640:2: warning: repeated branch in conditional chain [bugprone-branch-clone] | |
{ | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3649:3: note: end of the original | |
} | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3651:2: note: clone 1 starts here | |
{ | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3662:2: note: clone 2 starts here | |
{ | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3673:2: note: clone 3 starts here | |
{ | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3721:16: warning: 24 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.duration = 24; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3721:16: warning: 24 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:3743:13: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3743:13: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3743:13: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3749:7: warning: variable 'track_dir' is not initialized [cppcoreguidelines-init-variables] | |
auto track_dir = mob->in_room->tracks[i]->direction; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:3762:7: warning: variable 'pexit' is not initialized [cppcoreguidelines-init-variables] | |
auto pexit = mob->in_room->exit[track_dir]; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:3842:2: warning: this loop is infinite; none of its condition variables (room) are updated in the loop body [bugprone-infinite-loop] | |
for (auto room = room_list; room != NULL; room = room->next_room) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3909:2: warning: this loop is infinite; none of its condition variables (room) are updated in the loop body [bugprone-infinite-loop] | |
for (auto room = room_list; room != NULL; room = room->next_room) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3923:52: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!best_path || best_path->steps > path->steps) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3923:52: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!best_path || best_path->steps > path->steps) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3923:52: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!best_path || best_path->steps > path->steps) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3930:23: warning: 6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
for (auto i = 0; i < 6; i++) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3930:23: warning: 6 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:3949:24: warning: 6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
for (auto i = 0; i < 6; i++) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3949:24: warning: 6 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:3957:23: warning: 6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
for (auto i = 0; i < 6; i++) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3957:23: warning: 6 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:3982:23: warning: 6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
for (auto i = 0; i < 6; i++) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:3982:23: warning: 6 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:3997:49: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_aura_of_sustenance(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4036:37: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_vanish(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4076:19: warning: variable 'pRoomIndex' is not initialized [cppcoreguidelines-init-variables] | |
ROOM_INDEX_DATA *pRoomIndex; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_move.c:4077:35: warning: 100000 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
for (auto nocrash = 0; nocrash < 100000; nocrash++) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4077:35: warning: 100000 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:4079:47: warning: 30000 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
pRoomIndex = get_room_index(number_range(0, 30000)); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4079:47: warning: 30000 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:4080:26: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (pRoomIndex == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4080:26: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (pRoomIndex == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4080:26: warning: statement should be inside braces [readability-braces-around-statements] | |
if (pRoomIndex == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4133:12: warning: 50 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
chance = 50; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4133:12: warning: 50 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:4148:15: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (door < 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4148:15: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (door < 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4148:15: warning: statement should be inside braces [readability-braces-around-statements] | |
if (door < 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4151:7: warning: variable 'pexit' is not initialized [cppcoreguidelines-init-variables] | |
auto pexit = ch->in_room->exit[door]; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:4177:14: warning: 20 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
chance += 20; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4177:14: warning: 20 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:4182:12: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
chance = 100; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4182:12: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_move.c:4214:7: warning: variable 'to_room' is not initialized [cppcoreguidelines-init-variables] | |
auto to_room = pexit->u1.to_room; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:4215:7: warning: variable 'pexit_rev' is not initialized [cppcoreguidelines-init-variables] | |
auto pexit_rev = to_room->exit[rev_dir[door]]; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:4265:7: warning: variable 'cost' is not initialized [cppcoreguidelines-init-variables] | |
auto cost = 50 * (ch->level * ch->level); | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:4274:5: warning: if with identical then and else branches [bugprone-branch-clone] | |
if (ch->hometown == i) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4279:5: note: else branch starts here | |
else | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4289:2: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4303:3: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4328:12: warning: variable 'blocker' is not initialized [cppcoreguidelines-init-variables] | |
for (auto blocker = ch->in_room->people; blocker != NULL; blocker = blocker->next_in_room) | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:4383:7: warning: variable 'str' is not initialized [cppcoreguidelines-init-variables] | |
auto str = palloc_string(blocker->pIndexData->barred_entry->message); | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:4403:9: warning: variable 'strtwo' is not initialized [cppcoreguidelines-init-variables] | |
auto strtwo = palloc_string(blocker->pIndexData->barred_entry->message_two); | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_move.c:4413:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4413:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4413:22: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4422:8: warning: variable 'point' is not initialized [cppcoreguidelines-init-variables] | |
char *point; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_move.c:4437:4: warning: switch has 3 consecutive identical branches [bugprone-branch-clone] | |
case 'n': | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4448:10: note: last of these clones ends here | |
break; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4471:111: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (room->sector_type == SECT_WATER || room->sector_type == SECT_UNDERWATER || room->sector_type == SECT_AIR) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4471:111: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (room->sector_type == SECT_WATER || room->sector_type == SECT_UNDERWATER || room->sector_type == SECT_AIR) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4471:111: warning: statement should be inside braces [readability-braces-around-statements] | |
if (room->sector_type == SECT_WATER || room->sector_type == SECT_UNDERWATER || room->sector_type == SECT_AIR) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4479:65: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_GROUND(room) && is_affected(ch, gsn_pass_without_trace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4479:65: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_GROUND(room) && is_affected(ch, gsn_pass_without_trace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4479:65: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_GROUND(room) && is_affected(ch, gsn_pass_without_trace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4482:30: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (room->tracks[0] == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4482:30: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (room->tracks[0] == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_move.c:4482:30: warning: statement should be inside braces [readability-braces-around-statements] | |
if (room->tracks[0] == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:69:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
CHAR_DATA *owner, *wch; | |
^~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:69:13: warning: variable 'owner' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *owner, *wch; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:69:21: warning: variable 'wch' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *owner, *wch; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:85:39: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (obj->item_type != ITEM_CORPSE_PC) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:85:39: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (obj->item_type != ITEM_CORPSE_PC) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:85:39: warning: statement should be inside braces [readability-braces-around-statements] | |
if (obj->item_type != ITEM_CORPSE_PC) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:94:40: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!obj->owner || obj->owner == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:94:40: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!obj->owner || obj->owner == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:94:40: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!obj->owner || obj->owner == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:121:31: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_same_group(ch, owner)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:121:31: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_same_group(ch, owner)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:121:31: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_same_group(ch, owner)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:130:13: warning: variable 'gch' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *gch; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:131:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int members, pchance; | |
^~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:131:6: warning: variable 'members' is not initialized [cppcoreguidelines-init-variables] | |
int members, pchance; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:131:15: warning: variable 'pchance' is not initialized [cppcoreguidelines-init-variables] | |
int members, pchance; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:132:14: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
char buffer[100]; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:132:14: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:134:38: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected_obj(obj, gsn_stash)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:134:38: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected_obj(obj, gsn_stash)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:134:38: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected_obj(obj, gsn_stash)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:137:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (!CAN_WEAR(obj, ITEM_TAKE)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:185:55: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (container->pIndexData->vnum == OBJ_VNUM_PIT && !CAN_WEAR(container, ITEM_TAKE)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:185:86: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (container->pIndexData->vnum == OBJ_VNUM_PIT && !CAN_WEAR(container, ITEM_TAKE)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:185:86: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (container->pIndexData->vnum == OBJ_VNUM_PIT && !CAN_WEAR(container, ITEM_TAKE)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:185:86: warning: statement should be inside braces [readability-braces-around-statements] | |
if (container->pIndexData->vnum == OBJ_VNUM_PIT && !CAN_WEAR(container, ITEM_TAKE)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:269:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->progtypes, IPROG_GET)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:269:41: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_SET(obj->progtypes, IPROG_GET)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:269:41: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_SET(obj->progtypes, IPROG_GET)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:269:41: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_SET(obj->progtypes, IPROG_GET)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:272:20: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (TRAPS_IEVENT(obj, TRAP_ILOOT)) | |
^ | |
/home/sgilliam/src/riftshadow/code/spec.h:20:36: note: expanded from macro 'TRAPS_IEVENT' | |
#define TRAPS_IEVENT(owner, event) owner->pIndexData->spec_prog.trapvector & event | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:272:37: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (TRAPS_IEVENT(obj, TRAP_ILOOT)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:272:37: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (TRAPS_IEVENT(obj, TRAP_ILOOT)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:272:37: warning: statement should be inside braces [readability-braces-around-statements] | |
if (TRAPS_IEVENT(obj, TRAP_ILOOT)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:282:12: warning: variable 'obj_next' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:283:12: warning: variable 'container' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *container; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:284:7: warning: variable 'found' is not initialized [cppcoreguidelines-init-variables] | |
bool found; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:285:7: warning: variable 'isPcCorpse' is not initialized [cppcoreguidelines-init-variables] | |
bool isPcCorpse; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:293:29: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!str_cmp(arg2, "from")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:293:29: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!str_cmp(arg2, "from")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:293:29: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!str_cmp(arg2, "from")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:325:24: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (obj == NULL || (IS_SET(obj->extra_flags, ITEM_NOSHOW) && !IS_IMMORTAL(ch))) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:351:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->extra_flags, ITEM_NOSHOW) && !IS_IMMORTAL(ch)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:351:67: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_SET(obj->extra_flags, ITEM_NOSHOW) && !IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:351:67: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_SET(obj->extra_flags, ITEM_NOSHOW) && !IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:351:67: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_SET(obj->extra_flags, ITEM_NOSHOW) && !IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:372:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (arg1[3] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:372:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (arg1[3] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:372:25: warning: statement should be inside braces [readability-braces-around-statements] | |
if (arg1[3] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:374:9: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:374:9: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:374:9: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:415:18: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET_OLD(container->value[1], CONT_CLOSED)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:447:8: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(container->progtypes, IPROG_LOOT)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:449:83: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (((container->pIndexData->iprogs->loot_prog)(container, obj, ch)) == false) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:449:83: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (((container->pIndexData->iprogs->loot_prog)(container, obj, ch)) == false) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:449:83: warning: statement should be inside braces [readability-braces-around-statements] | |
if (((container->pIndexData->iprogs->loot_prog)(container, obj, ch)) == false) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:453:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (TRAPS_IEVENT(container, TRAP_ILOOT)) | |
^ | |
/home/sgilliam/src/riftshadow/code/spec.h:20:36: note: expanded from macro 'TRAPS_IEVENT' | |
#define TRAPS_IEVENT(owner, event) owner->pIndexData->spec_prog.trapvector & event | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:455:64: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (CALL_IEVENT(container, TRAP_ILOOT, ch, container, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:455:64: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (CALL_IEVENT(container, TRAP_ILOOT, ch, container, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:455:64: warning: statement should be inside braces [readability-braces-around-statements] | |
if (CALL_IEVENT(container, TRAP_ILOOT, ch, container, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:496:10: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(container->progtypes, IPROG_LOOT)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:498:85: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (((container->pIndexData->iprogs->loot_prog)(container, obj, ch)) == false) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:498:85: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (((container->pIndexData->iprogs->loot_prog)(container, obj, ch)) == false) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:498:85: warning: statement should be inside braces [readability-braces-around-statements] | |
if (((container->pIndexData->iprogs->loot_prog)(container, obj, ch)) == false) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:502:23: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (TRAPS_IEVENT(container, TRAP_ILOOT)) | |
^ | |
/home/sgilliam/src/riftshadow/code/spec.h:20:36: note: expanded from macro 'TRAPS_IEVENT' | |
#define TRAPS_IEVENT(owner, event) owner->pIndexData->spec_prog.trapvector & event | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:504:66: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (CALL_IEVENT(container, TRAP_ILOOT, ch, container, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:504:66: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (CALL_IEVENT(container, TRAP_ILOOT, ch, container, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:504:66: warning: statement should be inside braces [readability-braces-around-statements] | |
if (CALL_IEVENT(container, TRAP_ILOOT, ch, container, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:523:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (arg1[3] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:523:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (arg1[3] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:523:25: warning: statement should be inside braces [readability-braces-around-statements] | |
if (arg1[3] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:525:9: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:525:9: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:525:9: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:536:12: warning: variable 'container' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *container; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:537:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:538:12: warning: variable 'obj_next' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:539:6: warning: variable 'pchance' is not initialized [cppcoreguidelines-init-variables] | |
int pchance; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:543:51: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!str_cmp(arg2, "in") || !str_cmp(arg2, "on")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:543:51: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!str_cmp(arg2, "in") || !str_cmp(arg2, "on")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:543:51: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!str_cmp(arg2, "in") || !str_cmp(arg2, "on")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:578:17: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET_OLD(container->value[1], CONT_CLOSED)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:613:71: warning: 31 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (obj->pIndexData->limtotal > 0 && container->pIndexData->vnum != 31) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:613:71: warning: 31 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:619:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_OBJ_STAT(obj, ITEM_NO_STASH)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4210:34: note: expanded from macro 'IS_OBJ_STAT' | |
#define IS_OBJ_STAT(obj, stat) (IS_SET(obj->extra_flags, stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:625:27: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (WEIGHT_MULT(obj) != 100 && container->pIndexData->vnum != 31) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:625:27: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:625:65: warning: 31 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (WEIGHT_MULT(obj) != 100 && container->pIndexData->vnum != 31) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:625:65: warning: 31 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:638:55: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (container->pIndexData->vnum == OBJ_VNUM_PIT && !CAN_WEAR(container, ITEM_TAKE)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:640:30: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
obj->timer = number_range(100, 200); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:640:30: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:640:35: warning: 200 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
obj->timer = number_range(100, 200); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:640:35: warning: 200 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:652:20: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET_OLD(container->value[1], CONT_PUT_ON)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:666:20: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET_OLD(container->value[1], CONT_PUT_ON)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:682:19: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET_OLD(container->value[1], CONT_PUT_ON)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:703:28: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
&& WEIGHT_MULT(obj) == 100 | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:703:28: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:712:57: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (container->pIndexData->vnum == OBJ_VNUM_PIT && !CAN_WEAR(obj, ITEM_TAKE)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:714:32: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
obj->timer = number_range(100, 200); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:714:32: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:714:37: warning: 200 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
obj->timer = number_range(100, 200); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:714:37: warning: 200 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:720:20: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET_OLD(container->value[1], CONT_PUT_ON)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:738:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:739:12: warning: variable 'obj_next' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:740:7: warning: variable 'found' is not initialized [cppcoreguidelines-init-variables] | |
bool found; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:741:6: warning: variable 'pchance' is not initialized [cppcoreguidelines-init-variables] | |
int pchance; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:754:3: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int amount, gold = 0; | |
^~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:754:7: warning: variable 'amount' is not initialized [cppcoreguidelines-init-variables] | |
int amount, gold = 0; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:756:12: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
amount = atoi(arg); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:784:5: warning: switch has 2 consecutive identical branches [bugprone-branch-clone] | |
case OBJ_VNUM_GOLD_SOME: | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:791:11: note: last of these clones ends here | |
break; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:865:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->progtypes, IPROG_DROP)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:865:42: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_SET(obj->progtypes, IPROG_DROP)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:865:42: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_SET(obj->progtypes, IPROG_DROP)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:865:42: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_SET(obj->progtypes, IPROG_DROP)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:871:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_OBJ_STAT(obj, ITEM_MELT_DROP)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4210:34: note: expanded from macro 'IS_OBJ_STAT' | |
#define IS_OBJ_STAT(obj, stat) (IS_SET(obj->extra_flags, stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:883:31: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (str_prefix("all.", arg)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:883:31: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (str_prefix("all.", arg)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:883:31: warning: statement should be inside braces [readability-braces-around-statements] | |
if (str_prefix("all.", arg)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:902:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->progtypes, IPROG_DROP)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:902:44: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_SET(obj->progtypes, IPROG_DROP)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:902:44: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_SET(obj->progtypes, IPROG_DROP)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:902:44: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_SET(obj->progtypes, IPROG_DROP)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:908:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (TRAPS_IEVENT(obj, TRAP_IDROP)) | |
^ | |
/home/sgilliam/src/riftshadow/code/spec.h:20:36: note: expanded from macro 'TRAPS_IEVENT' | |
#define TRAPS_IEVENT(owner, event) owner->pIndexData->spec_prog.trapvector & event | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:908:39: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (TRAPS_IEVENT(obj, TRAP_IDROP)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:908:39: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (TRAPS_IEVENT(obj, TRAP_IDROP)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:908:39: warning: statement should be inside braces [readability-braces-around-statements] | |
if (TRAPS_IEVENT(obj, TRAP_IDROP)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:911:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_OBJ_STAT(obj, ITEM_MELT_DROP)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4210:34: note: expanded from macro 'IS_OBJ_STAT' | |
#define IS_OBJ_STAT(obj, stat) (IS_SET(obj->extra_flags, stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:922:23: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (arg[3] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:922:23: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (arg[3] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:922:23: warning: statement should be inside braces [readability-braces-around-statements] | |
if (arg[3] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:924:8: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:924:8: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:924:8: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:935:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:936:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:950:16: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
int amount = atoi(arg1); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1042:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_AFFECTED(obj, AFF_OBJ_BURNING)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4158:32: note: expanded from macro 'IS_AFFECTED' | |
#define IS_AFFECTED(ch, sn) (IS_SET(ch->affected_by, sn)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1072:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->progtypes, IPROG_GIVE)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1074:69: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if ((obj->pIndexData->iprogs->give_prog)(obj, ch, victim) == true); | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1074:69: warning: statement should be inside braces [readability-braces-around-statements] | |
if ((obj->pIndexData->iprogs->give_prog)(obj, ch, victim) == true); | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1091:19: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (TRAPS_IEVENT(obj, TRAP_IGIVE)) | |
^ | |
/home/sgilliam/src/riftshadow/code/spec.h:20:36: note: expanded from macro 'TRAPS_IEVENT' | |
#define TRAPS_IEVENT(owner, event) owner->pIndexData->spec_prog.trapvector & event | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1091:36: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (TRAPS_IEVENT(obj, TRAP_IGIVE)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1091:36: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (TRAPS_IEVENT(obj, TRAP_IGIVE)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1091:36: warning: statement should be inside braces [readability-braces-around-statements] | |
if (TRAPS_IEVENT(obj, TRAP_IGIVE)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1097:12: warning: variable 'find_corpse' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *find_corpse; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1098:12: warning: variable 'corpse' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *corpse; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1099:12: warning: variable 'sack' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *sack; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1100:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1101:12: warning: variable 'obj_next' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1102:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int number, count; | |
^~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1102:6: warning: variable 'number' is not initialized [cppcoreguidelines-init-variables] | |
int number, count; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1102:14: warning: variable 'count' is not initialized [cppcoreguidelines-init-variables] | |
int number, count; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1104:8: warning: variable 'name' is not initialized [cppcoreguidelines-init-variables] | |
char *name; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1105:8: warning: variable 'last_name' is not initialized [cppcoreguidelines-init-variables] | |
char *last_name; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1140:26: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (++count == number) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1140:26: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (++count == number) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1140:26: warning: statement should be inside braces [readability-braces-around-statements] | |
if (++count == number) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1208:16: warning: 24 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.duration = 24; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1208:16: warning: 24 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1215:12: warning: variable 'find_corpse' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *find_corpse; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1216:12: warning: variable 'corpse' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *corpse; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1217:12: warning: variable 'steak' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *steak; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1218:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1219:12: warning: variable 'obj_next' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1220:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int number, count; | |
^~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1220:6: warning: variable 'number' is not initialized [cppcoreguidelines-init-variables] | |
int number, count; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1220:14: warning: variable 'count' is not initialized [cppcoreguidelines-init-variables] | |
int number, count; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1221:8: warning: variable 'name' is not initialized [cppcoreguidelines-init-variables] | |
char *name; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1222:8: warning: variable 'last_name' is not initialized [cppcoreguidelines-init-variables] | |
char *last_name; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1245:26: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (++count == number) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1245:26: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (++count == number) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1245:26: warning: statement should be inside braces [readability-braces-around-statements] | |
if (++count == number) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1304:38: warning: pointer parameter 'argument' can be pointer to const [readability-non-const-parameter] | |
void do_envenom(CHAR_DATA *ch, char *argument) | |
^ | |
const | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1306:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1308:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int percent, skill; | |
^~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1308:6: warning: variable 'percent' is not initialized [cppcoreguidelines-init-variables] | |
int percent, skill; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1308:15: warning: variable 'skill' is not initialized [cppcoreguidelines-init-variables] | |
int percent, skill; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1335:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_OBJ_STAT(obj, ITEM_BLESS) || IS_OBJ_STAT(obj, ITEM_BURN_PROOF)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4210:34: note: expanded from macro 'IS_OBJ_STAT' | |
#define IS_OBJ_STAT(obj, stat) (IS_SET(obj->extra_flags, stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1335:39: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_OBJ_STAT(obj, ITEM_BLESS) || IS_OBJ_STAT(obj, ITEM_BURN_PROOF)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4210:34: note: expanded from macro 'IS_OBJ_STAT' | |
#define IS_OBJ_STAT(obj, stat) (IS_SET(obj->extra_flags, stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1358:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!obj->value[3]) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1358:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!obj->value[3]) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1358:22: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!obj->value[3]) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1367:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_WEAPON_STAT(obj, WEAPON_FLAMING) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4211:46: note: expanded from macro 'IS_WEAPON_STAT' | |
#define IS_WEAPON_STAT(obj,stat) (IS_SET_OLD(obj->value[4], stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1368:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
|| IS_WEAPON_STAT(obj, WEAPON_FROST) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4211:46: note: expanded from macro 'IS_WEAPON_STAT' | |
#define IS_WEAPON_STAT(obj,stat) (IS_SET_OLD(obj->value[4], stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1369:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
|| IS_WEAPON_STAT(obj, WEAPON_VAMPIRIC) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4211:46: note: expanded from macro 'IS_WEAPON_STAT' | |
#define IS_WEAPON_STAT(obj,stat) (IS_SET_OLD(obj->value[4], stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1370:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
|| IS_WEAPON_STAT(obj, WEAPON_SHARP) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4211:46: note: expanded from macro 'IS_WEAPON_STAT' | |
#define IS_WEAPON_STAT(obj,stat) (IS_SET_OLD(obj->value[4], stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1371:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
|| IS_WEAPON_STAT(obj, WEAPON_VORPAL) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4211:46: note: expanded from macro 'IS_WEAPON_STAT' | |
#define IS_WEAPON_STAT(obj,stat) (IS_SET_OLD(obj->value[4], stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1372:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
|| IS_WEAPON_STAT(obj, WEAPON_SHOCKING) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4211:46: note: expanded from macro 'IS_WEAPON_STAT' | |
#define IS_WEAPON_STAT(obj,stat) (IS_SET_OLD(obj->value[4], stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1373:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
|| IS_OBJ_STAT(obj, ITEM_BLESS) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4210:34: note: expanded from macro 'IS_OBJ_STAT' | |
#define IS_OBJ_STAT(obj, stat) (IS_SET(obj->extra_flags, stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1374:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
|| IS_OBJ_STAT(obj, ITEM_BURN_PROOF)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4210:34: note: expanded from macro 'IS_OBJ_STAT' | |
#define IS_OBJ_STAT(obj, stat) (IS_SET(obj->extra_flags, stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1386:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_WEAPON_STAT(obj, WEAPON_POISON)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4211:46: note: expanded from macro 'IS_WEAPON_STAT' | |
#define IS_WEAPON_STAT(obj,stat) (IS_SET_OLD(obj->value[4], stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1404:4: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
SET_BIT(oaf.bitvector, WEAPON_POISON); | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4140:30: note: expanded from macro 'SET_BIT' | |
#define SET_BIT(var, bit) ((var[(int)bit/32]) |= ((long)pow(2,bit % 32))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1414:3: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1431:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1432:12: warning: variable 'fountain' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *fountain; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1433:7: warning: variable 'found' is not initialized [cppcoreguidelines-init-variables] | |
bool found; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1499:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char arg[MAX_STRING_LENGTH], buf[MAX_STRING_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1500:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
OBJ_DATA *out, *on, *puddle; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1500:12: warning: variable 'out' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *out, *on, *puddle; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1500:18: warning: variable 'on' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *out, *on, *puddle; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1500:23: warning: variable 'puddle' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *out, *on, *puddle; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1502:6: warning: variable 'amount' is not initialized [cppcoreguidelines-init-variables] | |
int amount; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1596:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_AFFECTED(on, AFF_OBJ_BURNING)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4158:32: note: expanded from macro 'IS_AFFECTED' | |
#define IS_AFFECTED(ch, sn) (IS_SET(ch->affected_by, sn)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1600:41: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected_obj(on, gsn_immolate)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1600:41: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected_obj(on, gsn_immolate)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1600:41: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected_obj(on, gsn_immolate)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1609:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1610:6: warning: variable 'amount' is not initialized [cppcoreguidelines-init-variables] | |
int amount; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1611:6: warning: variable 'liquid' is not initialized [cppcoreguidelines-init-variables] | |
int liquid; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1625:40: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (obj->item_type == ITEM_FOUNTAIN) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1625:40: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (obj->item_type == ITEM_FOUNTAIN) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1625:40: warning: statement should be inside braces [readability-braces-around-statements] | |
if (obj->item_type == ITEM_FOUNTAIN) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1705:85: warning: 36 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
gain_condition(ch, COND_DRUNK, amount * liq_table[liquid].liq_affect[COND_DRUNK] / 36); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1705:85: warning: 36 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1732:19: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.modifier = -5; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1732:19: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1734:4: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
SET_BIT(af.bitvector, AFF_POISON); | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4140:30: note: expanded from macro 'SET_BIT' | |
#define SET_BIT(var, bit) ((var[(int)bit/32]) |= ((long)pow(2,bit % 32))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1742:24: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (obj->value[0] > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1742:24: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (obj->value[0] > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1742:24: warning: statement should be inside braces [readability-braces-around-statements] | |
if (obj->value[0] > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1749:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1795:9: warning: variable 'condition' is not initialized [cppcoreguidelines-init-variables] | |
int condition; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1823:21: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.modifier = -5; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1823:21: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1824:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
SET_BIT(af.bitvector, AFF_POISON); | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4140:30: note: expanded from macro 'SET_BIT' | |
#define SET_BIT(var, bit) ((var[(int)bit/32]) |= ((long)pow(2,bit % 32))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1847:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
OBJ_DATA *obj, *secondary, *revealed; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1847:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj, *secondary, *revealed; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1847:18: warning: variable 'secondary' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj, *secondary, *revealed; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1847:30: warning: variable 'revealed' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj, *secondary, *revealed; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1851:44: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (iWear == WEAR_COSMETIC || obj == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1851:44: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (iWear == WEAR_COSMETIC || obj == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1851:44: warning: statement should be inside braces [readability-braces-around-statements] | |
if (iWear == WEAR_COSMETIC || obj == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1854:16: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!fReplace) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1854:16: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!fReplace) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1854:16: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!fReplace) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1857:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->extra_flags, ITEM_NOREMOVE)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1861:24: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1861:24: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1861:24: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1875:24: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1875:24: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1875:24: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!IS_IMMORTAL(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1904:28: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (is_worn(revealed) && CAN_WEAR(revealed, ITEM_WEAR_COSMETIC)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1906:8: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(revealed->extra_flags, ITEM_UNDER_CLOTHES)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1908:9: warning: narrowing conversion from 'long' to 'double' [bugprone-narrowing-conversions] | |
if (revealed->wear_flags[0] - pow(2, ITEM_WEAR_COSMETIC) == obj->wear_flags[0]) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1908:9: warning: narrowing conversion from 'long' to 'double' [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1908:65: warning: narrowing conversion from 'long' to 'double' [bugprone-narrowing-conversions] | |
if (revealed->wear_flags[0] - pow(2, ITEM_WEAR_COSMETIC) == obj->wear_flags[0]) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1908:65: warning: narrowing conversion from 'long' to 'double' [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1908:84: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (revealed->wear_flags[0] - pow(2, ITEM_WEAR_COSMETIC) == obj->wear_flags[0]) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1908:84: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (revealed->wear_flags[0] - pow(2, ITEM_WEAR_COSMETIC) == obj->wear_flags[0]) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1908:84: warning: statement should be inside braces [readability-braces-around-statements] | |
if (revealed->wear_flags[0] - pow(2, ITEM_WEAR_COSMETIC) == obj->wear_flags[0]) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1944:12: warning: variable 'secondary' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *secondary; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1945:7: warning: variable 'wield_primary' is not initialized [cppcoreguidelines-init-variables] | |
bool wield_primary; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1946:12: warning: variable 'primary' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *primary; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1947:12: warning: variable 'weapon' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *weapon; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1948:12: warning: variable 'oldobj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *oldobj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1949:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int sn, skill; | |
^~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1949:6: warning: variable 'sn' is not initialized [cppcoreguidelines-init-variables] | |
int sn, skill; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1949:10: warning: variable 'skill' is not initialized [cppcoreguidelines-init-variables] | |
int sn, skill; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1950:19: warning: variable 'paf' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_AFFECT_DATA *paf; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1952:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (CAN_WEAR(obj, ITEM_WEAR_COSMETIC)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1954:13: warning: variable 'pObj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *pObj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1959:40: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (pObj->wear_loc == WEAR_COSMETIC) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1959:40: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (pObj->wear_loc == WEAR_COSMETIC) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1959:40: warning: statement should be inside braces [readability-braces-around-statements] | |
if (pObj->wear_loc == WEAR_COSMETIC) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1963:12: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (i >= 5 && !IS_IMMORTAL(ch)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1963:12: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1975:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (CAN_WEAR(obj, ITEM_WEAR_FINGER)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1980:48: warning: statement should be inside braces [google-readability-braces-around-statements] | |
&& !remove_obj(ch, WEAR_FINGER_R, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1980:48: warning: statement should be inside braces [hicpp-braces-around-statements] | |
&& !remove_obj(ch, WEAR_FINGER_R, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:1980:48: warning: statement should be inside braces [readability-braces-around-statements] | |
&& !remove_obj(ch, WEAR_FINGER_R, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2003:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (CAN_WEAR(obj, ITEM_WEAR_NECK)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2034:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (CAN_WEAR(obj, ITEM_WEAR_BODY)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2036:44: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_BODY, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2036:44: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!remove_obj(ch, WEAR_BODY, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2036:44: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_BODY, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2045:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (CAN_WEAR(obj, ITEM_WEAR_HEAD)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2055:44: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_HEAD, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2055:44: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!remove_obj(ch, WEAR_HEAD, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2055:44: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_HEAD, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2064:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (CAN_WEAR(obj, ITEM_WEAR_LEGS)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2066:44: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_LEGS, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2066:44: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!remove_obj(ch, WEAR_LEGS, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2066:44: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_LEGS, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2075:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (CAN_WEAR(obj, ITEM_WEAR_FEET)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2083:44: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_FEET, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2083:44: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!remove_obj(ch, WEAR_FEET, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2083:44: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_FEET, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2092:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (CAN_WEAR(obj, ITEM_WEAR_HANDS)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2094:45: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_HANDS, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2094:45: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!remove_obj(ch, WEAR_HANDS, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2094:45: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_HANDS, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2103:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (CAN_WEAR(obj, ITEM_WEAR_ARMS)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2105:44: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_ARMS, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2105:44: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!remove_obj(ch, WEAR_ARMS, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2105:44: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_ARMS, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2114:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (CAN_WEAR(obj, ITEM_WEAR_ABOUT)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2116:45: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_ABOUT, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2116:45: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!remove_obj(ch, WEAR_ABOUT, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2116:45: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_ABOUT, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2125:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (CAN_WEAR(obj, ITEM_WEAR_WAIST)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2127:45: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_WAIST, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2127:45: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!remove_obj(ch, WEAR_WAIST, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2127:45: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_WAIST, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2136:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (CAN_WEAR(obj, ITEM_WEAR_WRIST)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2170:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (CAN_WEAR(obj, ITEM_WEAR_HOLD)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2178:4: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2185:44: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_HOLD, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2185:44: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!remove_obj(ch, WEAR_HOLD, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2185:44: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_HOLD, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2213:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (CAN_WEAR(obj, ITEM_WEAR_SHIELD)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2221:4: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2228:46: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_SHIELD, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2228:46: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!remove_obj(ch, WEAR_SHIELD, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2228:46: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_SHIELD, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2258:4: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2265:45: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_LIGHT, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2265:45: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!remove_obj(ch, WEAR_LIGHT, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2265:45: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_LIGHT, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2287:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (CAN_WEAR(obj, ITEM_WEAR_WIELD)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2299:4: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2306:48: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (get_eq_char(ch, WEAR_DUAL_WIELD) != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2306:48: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (get_eq_char(ch, WEAR_DUAL_WIELD) != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2306:48: warning: statement should be inside braces [readability-braces-around-statements] | |
if (get_eq_char(ch, WEAR_DUAL_WIELD) != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2309:44: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (primary != NULL && (!hands_full(ch))) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2309:44: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (primary != NULL && (!hands_full(ch))) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2309:44: warning: statement should be inside braces [readability-braces-around-statements] | |
if (primary != NULL && (!hands_full(ch))) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2347:57: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (obj->weight <= primary->weight || obj->weight < 5) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2347:57: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2389:19: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (skill >= 100) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2389:19: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2389:23: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (skill >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2389:23: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (skill >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2389:23: warning: statement should be inside braces [readability-braces-around-statements] | |
if (skill >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2391:23: warning: 85 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (skill > 85) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2391:23: warning: 85 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2391:26: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 85) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2391:26: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 85) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2391:26: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 85) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2393:23: warning: 70 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (skill > 70) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2393:23: warning: 70 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2393:26: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 70) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2393:26: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 70) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2393:26: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 70) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2395:23: warning: 50 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (skill > 50) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2395:23: warning: 50 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2395:26: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 50) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2395:26: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 50) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2395:26: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 50) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2397:23: warning: 25 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (skill > 25) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2397:23: warning: 25 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2397:26: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 25) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2397:26: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 25) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2397:26: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 25) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2399:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2399:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2399:25: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2401:10: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2401:10: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2401:10: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2409:52: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_DUAL_WIELD, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2409:52: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!remove_obj(ch, WEAR_DUAL_WIELD, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2409:52: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_DUAL_WIELD, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2452:18: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (skill >= 100) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2452:18: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2452:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (skill >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2452:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (skill >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2452:22: warning: statement should be inside braces [readability-braces-around-statements] | |
if (skill >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2454:22: warning: 85 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (skill > 85) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2454:22: warning: 85 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2454:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 85) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2454:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 85) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2454:25: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 85) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2456:22: warning: 70 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (skill > 70) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2456:22: warning: 70 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2456:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 70) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2456:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 70) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2456:25: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 70) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2458:22: warning: 50 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (skill > 50) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2458:22: warning: 50 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2458:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 50) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2458:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 50) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2458:25: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 50) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2460:22: warning: 25 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (skill > 25) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2460:22: warning: 25 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2460:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 25) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2460:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 25) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2460:25: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 25) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2462:24: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2462:24: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2462:24: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2464:9: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2464:9: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2464:9: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2471:47: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_WIELD, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2471:47: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!remove_obj(ch, WEAR_WIELD, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2471:47: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_WIELD, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2485:29: warning: 0.75 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (secondary->weight < 0.75 * obj->weight || secondary->weight < 5) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2485:29: warning: 0.75 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2485:71: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (secondary->weight < 0.75 * obj->weight || secondary->weight < 5) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2485:71: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2497:28: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (secondary == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2497:28: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (secondary == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2497:28: warning: statement should be inside braces [readability-braces-around-statements] | |
if (secondary == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2504:33: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (sn == gsn_hand_to_hand) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2504:33: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (sn == gsn_hand_to_hand) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2504:33: warning: statement should be inside braces [readability-braces-around-statements] | |
if (sn == gsn_hand_to_hand) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2508:19: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (skill >= 100) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2508:19: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2508:23: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (skill >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2508:23: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (skill >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2508:23: warning: statement should be inside braces [readability-braces-around-statements] | |
if (skill >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2510:23: warning: 85 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (skill > 85) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2510:23: warning: 85 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2510:26: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 85) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2510:26: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 85) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2510:26: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 85) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2512:23: warning: 70 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (skill > 70) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2512:23: warning: 70 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2512:26: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 70) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2512:26: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 70) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2512:26: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 70) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2514:23: warning: 50 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (skill > 50) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2514:23: warning: 50 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2514:26: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 50) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2514:26: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 50) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2514:26: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 50) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2516:23: warning: 25 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (skill > 25) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2516:23: warning: 25 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2516:26: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 25) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2516:26: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 25) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2516:26: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 25) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2518:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2518:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2518:25: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2520:10: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2520:10: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2520:10: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2532:45: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_WIELD, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2532:45: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!remove_obj(ch, WEAR_WIELD, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2532:45: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_WIELD, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2561:30: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (sn == gsn_hand_to_hand) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2561:30: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (sn == gsn_hand_to_hand) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2561:30: warning: statement should be inside braces [readability-braces-around-statements] | |
if (sn == gsn_hand_to_hand) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2565:16: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (skill >= 100) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2565:16: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2565:20: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (skill >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2565:20: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (skill >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2565:20: warning: statement should be inside braces [readability-braces-around-statements] | |
if (skill >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2567:20: warning: 85 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (skill > 85) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2567:20: warning: 85 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2567:23: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 85) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2567:23: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 85) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2567:23: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 85) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2569:20: warning: 70 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (skill > 70) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2569:20: warning: 70 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2569:23: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 70) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2569:23: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 70) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2569:23: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 70) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2571:20: warning: 50 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (skill > 50) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2571:20: warning: 50 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2571:23: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 50) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2571:23: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 50) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2571:23: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 50) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2573:20: warning: 25 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (skill > 25) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2573:20: warning: 25 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2573:23: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 25) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2573:23: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 25) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2573:23: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 25) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2575:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2575:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2575:22: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2577:7: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2577:7: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2577:7: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2584:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (CAN_WEAR(obj, ITEM_WEAR_BRAND)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2586:45: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_BRAND, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2586:45: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!remove_obj(ch, WEAR_BRAND, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2586:45: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_BRAND, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2595:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (CAN_WEAR(obj, ITEM_WEAR_STRAPPED)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2597:48: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_STRAPPED, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2597:48: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!remove_obj(ch, WEAR_STRAPPED, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2597:48: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!remove_obj(ch, WEAR_STRAPPED, fReplace)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2606:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (CAN_WEAR(obj, ITEM_WEAR_COSMETIC)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2610:18: warning: variable 'pObj' is not initialized [cppcoreguidelines-init-variables] | |
for (OBJ_DATA *pObj = ch->carrying; pObj; pObj = pObj->next_content) | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2612:40: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (pObj->wear_loc == WEAR_COSMETIC) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2612:40: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (pObj->wear_loc == WEAR_COSMETIC) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2612:40: warning: statement should be inside braces [readability-braces-around-statements] | |
if (pObj->wear_loc == WEAR_COSMETIC) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2616:12: warning: 6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (i >= 6) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2616:12: warning: 6 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2628:15: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (fReplace) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2628:15: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (fReplace) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2628:15: warning: statement should be inside braces [readability-braces-around-statements] | |
if (fReplace) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2635:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2659:13: warning: variable 'obj_next' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2665:59: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (obj->wear_loc == WEAR_NONE && can_see_obj(ch, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2665:59: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (obj->wear_loc == WEAR_NONE && can_see_obj(ch, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2665:59: warning: statement should be inside braces [readability-braces-around-statements] | |
if (obj->wear_loc == WEAR_NONE && can_see_obj(ch, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2671:2: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2682:8: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
&& !IS_SET(obj->pIndexData->wear_flags, ITEM_WEAR_WIELD) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2683:8: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
&& !IS_SET(obj->pIndexData->wear_flags, ITEM_WEAR_SHIELD) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2684:8: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
&& !IS_SET(obj->pIndexData->wear_flags, ITEM_WEAR_HOLD)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2697:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2709:13: warning: variable 'obj_next' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2715:90: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (obj->wear_loc != WEAR_NONE && can_see_obj(ch, obj) && obj->wear_loc != WEAR_BRAND) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2715:90: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (obj->wear_loc != WEAR_NONE && can_see_obj(ch, obj) && obj->wear_loc != WEAR_BRAND) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2715:90: warning: statement should be inside braces [readability-braces-around-statements] | |
if (obj->wear_loc != WEAR_NONE && can_see_obj(ch, obj) && obj->wear_loc != WEAR_BRAND) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2721:2: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2752:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2753:12: warning: variable 'ibj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *ibj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2754:12: warning: variable 'ibj_next' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *ibj_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2755:13: warning: variable 'gch' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *gch; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2784:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (!CAN_WEAR(obj, ITEM_TAKE) || IS_OBJ_STAT(obj, ITEM_NO_SAC)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2784:35: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (!CAN_WEAR(obj, ITEM_TAKE) || IS_OBJ_STAT(obj, ITEM_NO_SAC)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4210:34: note: expanded from macro 'IS_OBJ_STAT' | |
#define IS_OBJ_STAT(obj, stat) (IS_SET(obj->extra_flags, stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2811:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->progtypes, IPROG_SAC)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2813:52: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if ((obj->pIndexData->iprogs->sac_prog)(obj, ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2813:52: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if ((obj->pIndexData->iprogs->sac_prog)(obj, ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2813:52: warning: statement should be inside braces [readability-braces-around-statements] | |
if ((obj->pIndexData->iprogs->sac_prog)(obj, ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2817:19: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (TRAPS_IEVENT(obj, TRAP_ISAC)) | |
^ | |
/home/sgilliam/src/riftshadow/code/spec.h:20:36: note: expanded from macro 'TRAPS_IEVENT' | |
#define TRAPS_IEVENT(owner, event) owner->pIndexData->spec_prog.trapvector & event | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2819:44: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (CALL_IEVENT(obj, TRAP_ISAC, ch, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2819:44: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (CALL_IEVENT(obj, TRAP_ISAC, ch, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2819:44: warning: statement should be inside braces [readability-braces-around-statements] | |
if (CALL_IEVENT(obj, TRAP_ISAC, ch, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2855:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2946:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2947:12: warning: variable 'scroll' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *scroll; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:2948:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3020:26: warning: 15 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (number_percent() >= 15 + get_skill(ch, gsn_scrolls) * 4 / 5 + UMAX(0, alangbonus * 3)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3020:26: warning: 15 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3020:64: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (number_percent() >= 15 + get_skill(ch, gsn_scrolls) * 4 / 5 + UMAX(0, alangbonus * 3)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3020:64: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3040:39: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_brandish(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3042:13: warning: variable 'vch' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *vch; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3043:13: warning: variable 'vch_next' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *vch_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3044:12: warning: variable 'staff' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *staff; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3045:6: warning: variable 'sn' is not initialized [cppcoreguidelines-init-variables] | |
int sn; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3094:21: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (vch != ch) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3094:21: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (vch != ch) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3094:21: warning: statement should be inside braces [readability-braces-around-statements] | |
if (vch != ch) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3109:61: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (ch != vch && !trusts(ch, vch) && is_safe(ch, vch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3109:61: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (ch != vch && !trusts(ch, vch) && is_safe(ch, vch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3109:61: warning: statement should be inside braces [readability-braces-around-statements] | |
if (ch != vch && !trusts(ch, vch) && is_safe(ch, vch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3114:21: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (vch != ch) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3114:21: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (vch != ch) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3114:21: warning: statement should be inside braces [readability-braces-around-statements] | |
if (vch != ch) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3140:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3141:12: warning: variable 'wand' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *wand; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3142:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3222:30: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!check_deny_magic(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3222:30: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!check_deny_magic(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3222:30: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!check_deny_magic(ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3242:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3243:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3244:6: warning: variable 'chance' is not initialized [cppcoreguidelines-init-variables] | |
int chance; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3276:26: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_safe(ch, victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3276:26: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_safe(ch, victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3276:26: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_safe(ch, victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3297:12: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
chance += 5 * (get_curr_stat(ch, STAT_DEX) - 20); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3297:12: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3297:47: warning: 20 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
chance += 5 * (get_curr_stat(ch, STAT_DEX) - 20); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3297:47: warning: 20 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3304:26: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (can_see(victim, ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3304:26: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (can_see(victim, ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3304:26: warning: statement should be inside braces [readability-braces-around-statements] | |
if (can_see(victim, ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3305:13: warning: 25 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
chance -= 25; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3305:13: warning: 25 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3306:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3306:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3306:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3307:13: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
chance += 5; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3307:13: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3310:13: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
chance -= 10; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3310:13: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3313:13: warning: 25 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
chance += 25; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3313:13: warning: 25 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3315:52: warning: 15 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
chance -= 2 * (get_curr_stat(victim, STAT_DEX) - 15); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3315:52: warning: 15 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3323:23: warning: 59 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (get_trust(ch) >= 59) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3323:23: warning: 59 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3323:26: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (get_trust(ch) >= 59) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3323:26: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (get_trust(ch) >= 59) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3323:26: warning: statement should be inside braces [readability-braces-around-statements] | |
if (get_trust(ch) >= 59) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3324:12: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
chance = 100; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3324:12: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3347:4: warning: switch has 4 consecutive identical branches [bugprone-branch-clone] | |
case 0: | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3360:10: note: last of these clones ends here | |
break; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3384:7: warning: variable 'gold' is not initialized [cppcoreguidelines-init-variables] | |
int gold; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3427:32: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (!can_drop_obj(ch, obj) || IS_SET(obj->extra_flags, ITEM_INVENTORY)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3453:34: warning: 6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
damage_new(victim, ch, dice(4, 6), gsn_burning_hands, DAM_FIRE, true, HIT_UNBLOCKABLE, HIT_NOADD, HIT_NOMULT, NULL); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3453:34: warning: 6 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3473:13: warning: variable 'keeper' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *keeper; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3474:13: warning: variable 'pShop' is not initialized [cppcoreguidelines-init-variables] | |
SHOP_DATA *pShop; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3543:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
OBJ_DATA *t_obj, *t_obj_next; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3543:12: warning: variable 't_obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *t_obj, *t_obj_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3543:20: warning: variable 't_obj_next' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *t_obj, *t_obj_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3553:8: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_OBJ_STAT(t_obj, ITEM_INVENTORY)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4210:34: note: expanded from macro 'IS_OBJ_STAT' | |
#define IS_OBJ_STAT(obj, stat) (IS_SET(obj->extra_flags, stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3586:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3598:26: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (++count == number) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3598:26: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (++count == number) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3598:26: warning: statement should be inside braces [readability-braces-around-statements] | |
if (++count == number) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3614:53: warning: parameter 'fBuy' is unused [misc-unused-parameters] | |
int get_cost(CHAR_DATA *keeper, OBJ_DATA *obj, bool fBuy) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3616:13: warning: variable 'pShop' is not initialized [cppcoreguidelines-init-variables] | |
SHOP_DATA *pShop; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3617:8: warning: variable 'cost' is not initialized [cppcoreguidelines-init-variables] | |
float cost; | |
^ | |
= NAN | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3622:9: warning: narrowing conversion from 'int' to 'float' [bugprone-narrowing-conversions] | |
cost = obj->cost * calculate_inflation(); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3622:9: warning: narrowing conversion from 'int' to 'float' [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3669:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int cost, roll; | |
^~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3669:6: warning: variable 'cost' is not initialized [cppcoreguidelines-init-variables] | |
int cost, roll; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3669:12: warning: variable 'roll' is not initialized [cppcoreguidelines-init-variables] | |
int cost, roll; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3670:6: warning: variable 'i' is not initialized [cppcoreguidelines-init-variables] | |
int i; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3688:14: warning: variable 'pet' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *pet; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3689:20: warning: variable 'pRoomIndexNext' is not initialized [cppcoreguidelines-init-variables] | |
ROOM_INDEX_DATA *pRoomIndexNext; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3690:20: warning: variable 'in_room' is not initialized [cppcoreguidelines-init-variables] | |
ROOM_INDEX_DATA *in_room; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3744:36: warning: 60 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (get_skill(ch, gsn_haggle) > 60) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3744:36: warning: 60 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3744:39: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (get_skill(ch, gsn_haggle) > 60) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3744:39: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (get_skill(ch, gsn_haggle) > 60) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3744:39: warning: statement should be inside braces [readability-braces-around-statements] | |
if (get_skill(ch, gsn_haggle) > 60) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3745:31: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
cost -= cost / 3 * roll / 100; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3745:31: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3751:11: warning: variable 'mcost' is not initialized [cppcoreguidelines-init-variables] | |
float mcost = cost * ch->Profs()->ProfEffect("appraising") / 100; | |
^ | |
= NAN | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3795:2: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3797:14: warning: variable 'keeper' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *keeper; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3798:3: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
OBJ_DATA *obj = NULL, *t_obj = NULL, *d_obj = NULL, *c_obj = NULL; | |
^ | |
note: this fix will not be applied because it overlaps with another fix | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3799:3: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char arg[MAX_INPUT_LENGTH], buf[MSL]; | |
^ | |
note: this fix will not be applied because it overlaps with another fix | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3800:3: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int number = 1, count = 1; | |
^ | |
note: this fix will not be applied because it overlaps with another fix | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3804:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (keeper == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3804:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (keeper == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3804:22: warning: statement should be inside braces [readability-braces-around-statements] | |
if (keeper == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3807:20: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (keeper == ch) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3807:20: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (keeper == ch) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3807:20: warning: statement should be inside braces [readability-braces-around-statements] | |
if (keeper == ch) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3812:27: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (argument[0] != '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3812:27: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (argument[0] != '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3812:27: warning: statement should be inside braces [readability-braces-around-statements] | |
if (argument[0] != '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3813:13: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
number = atoi(argument); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3824:16: warning: 9 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (number > 9) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3824:16: warning: 9 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3837:8: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (!IS_OBJ_STAT(obj, ITEM_INVENTORY)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4210:34: note: expanded from macro 'IS_OBJ_STAT' | |
#define IS_OBJ_STAT(obj, stat) (IS_SET(obj->extra_flags, stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3841:96: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (t_obj->pIndexData == obj->pIndexData && !str_cmp(t_obj->short_descr, obj->short_descr)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3841:96: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (t_obj->pIndexData == obj->pIndexData && !str_cmp(t_obj->short_descr, obj->short_descr)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3841:96: warning: statement should be inside braces [readability-braces-around-statements] | |
if (t_obj->pIndexData == obj->pIndexData && !str_cmp(t_obj->short_descr, obj->short_descr)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3843:9: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3843:9: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3843:9: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3857:19: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (number > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3857:19: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (number > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3857:19: warning: statement should be inside braces [readability-braces-around-statements] | |
if (number > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3859:8: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3859:8: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3859:8: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3885:37: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (check_benevolence(ch, keeper)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3885:37: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (check_benevolence(ch, keeper)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3885:37: warning: statement should be inside braces [readability-braces-around-statements] | |
if (check_benevolence(ch, keeper)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3896:36: warning: 60 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (get_skill(ch, gsn_haggle) > 60) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3896:36: warning: 60 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3896:39: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (get_skill(ch, gsn_haggle) > 60) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3896:39: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (get_skill(ch, gsn_haggle) > 60) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3896:39: warning: statement should be inside braces [readability-braces-around-statements] | |
if (get_skill(ch, gsn_haggle) > 60) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3897:36: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
cost -= obj->cost / 2 * roll / 100; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3897:36: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3901:11: warning: variable 'mcost' is not initialized [cppcoreguidelines-init-variables] | |
float mcost = cost * ch->Profs()->ProfEffect("appraising") / 100; | |
^ | |
= NAN | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3928:8: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->extra_flags, ITEM_INVENTORY)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3948:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (t_obj->timer > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3948:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (t_obj->timer > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3948:25: warning: statement should be inside braces [readability-braces-around-statements] | |
if (t_obj->timer > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3953:27: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (cost < t_obj->cost) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3953:27: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (cost < t_obj->cost) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3953:27: warning: statement should be inside braces [readability-braces-around-statements] | |
if (cost < t_obj->cost) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3971:20: warning: variable 'pRoomIndexNext' is not initialized [cppcoreguidelines-init-variables] | |
ROOM_INDEX_DATA *pRoomIndexNext; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3972:14: warning: variable 'pet' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *pet; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3973:8: warning: variable 'found' is not initialized [cppcoreguidelines-init-variables] | |
bool found; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3977:36: warning: 9706 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
pRoomIndexNext = get_room_index(9706); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:3977:36: warning: 9706 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4005:14: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4005:14: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4005:14: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4010:14: warning: variable 'keeper' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *keeper; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4011:13: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4012:3: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int cost, count; | |
^~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4012:7: warning: variable 'cost' is not initialized [cppcoreguidelines-init-variables] | |
int cost, count; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4012:13: warning: variable 'count' is not initialized [cppcoreguidelines-init-variables] | |
int cost, count; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4013:8: warning: variable 'found' is not initialized [cppcoreguidelines-init-variables] | |
bool found; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4018:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (keeper == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4018:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (keeper == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4018:22: warning: statement should be inside braces [readability-braces-around-statements] | |
if (keeper == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4038:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_OBJ_STAT(obj, ITEM_INVENTORY)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4210:34: note: expanded from macro 'IS_OBJ_STAT' | |
#define IS_OBJ_STAT(obj, stat) (IS_SET(obj->extra_flags, stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4061:14: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4061:14: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4061:14: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4066:35: warning: pointer parameter 'argument' can be pointer to const [readability-non-const-parameter] | |
void do_sell(CHAR_DATA *ch, char *argument) | |
^ | |
const | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4070:13: warning: variable 'keeper' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *keeper; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4082:21: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (keeper == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4082:21: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (keeper == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4082:21: warning: statement should be inside braces [readability-braces-around-statements] | |
if (keeper == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4125:13: warning: variable 'keeper' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *keeper; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4126:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4127:6: warning: variable 'cost' is not initialized [cppcoreguidelines-init-variables] | |
int cost; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4139:21: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (keeper == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4139:21: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (keeper == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4139:21: warning: statement should be inside braces [readability-braces-around-statements] | |
if (keeper == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4171:76: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
sprintf(buf, "$n tells you 'I'll give you %d gold coins for $p.'", cost / 100); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4171:76: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4180:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4181:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4186:8: warning: variable 'tname' is not initialized [cppcoreguidelines-init-variables] | |
char *tname; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4282:23: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if ((is_worn(obj) && IS_SET(obj->extra_flags, ITEM_NOREMOVE)) || IS_SET(obj->extra_flags, ITEM_NODROP)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4282:67: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if ((is_worn(obj) && IS_SET(obj->extra_flags, ITEM_NOREMOVE)) || IS_SET(obj->extra_flags, ITEM_NODROP)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4320:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->progtypes, IPROG_GIVE)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4320:41: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_SET(obj->progtypes, IPROG_GIVE)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4320:41: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_SET(obj->progtypes, IPROG_GIVE)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4320:41: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_SET(obj->progtypes, IPROG_GIVE)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4333:16: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.duration = 5; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4333:16: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4344:12: warning: variable 'weapon' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *weapon; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4345:6: warning: variable 'count' is not initialized [cppcoreguidelines-init-variables] | |
int count; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4349:42: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (get_eq_char(ch, WEAR_LIGHT) != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4349:42: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (get_eq_char(ch, WEAR_LIGHT) != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4349:42: warning: statement should be inside braces [readability-braces-around-statements] | |
if (get_eq_char(ch, WEAR_LIGHT) != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4352:42: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (get_eq_char(ch, WEAR_WIELD) != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4352:42: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (get_eq_char(ch, WEAR_WIELD) != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4352:42: warning: statement should be inside braces [readability-braces-around-statements] | |
if (get_eq_char(ch, WEAR_WIELD) != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4355:41: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (get_eq_char(ch, WEAR_HOLD) != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4355:41: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (get_eq_char(ch, WEAR_HOLD) != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4355:41: warning: statement should be inside braces [readability-braces-around-statements] | |
if (get_eq_char(ch, WEAR_HOLD) != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4358:43: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (get_eq_char(ch, WEAR_SHIELD) != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4358:43: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (get_eq_char(ch, WEAR_SHIELD) != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4358:43: warning: statement should be inside braces [readability-braces-around-statements] | |
if (get_eq_char(ch, WEAR_SHIELD) != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4361:47: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (get_eq_char(ch, WEAR_DUAL_WIELD) != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4361:47: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (get_eq_char(ch, WEAR_DUAL_WIELD) != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4361:47: warning: statement should be inside braces [readability-braces-around-statements] | |
if (get_eq_char(ch, WEAR_DUAL_WIELD) != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4374:16: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (count < 2) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4374:16: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (count < 2) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4374:16: warning: statement should be inside braces [readability-braces-around-statements] | |
if (count < 2) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4377:16: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (count > 2) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4377:16: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (count > 2) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4377:16: warning: statement should be inside braces [readability-braces-around-statements] | |
if (count > 2) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4385:12: warning: variable 'corpse' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *corpse; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4386:11: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
char arg[100]; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4386:11: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4463:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4465:6: warning: variable 'objvnum' is not initialized [cppcoreguidelines-init-variables] | |
int objvnum = cabal_table[ch->cabal].item_vnum; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4469:40: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (obj->pIndexData->vnum == objvnum) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4469:40: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (obj->pIndexData->vnum == objvnum) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4469:40: warning: statement should be inside braces [readability-braces-around-statements] | |
if (obj->pIndexData->vnum == objvnum) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4483:13: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (show) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4483:13: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (show) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4483:13: warning: statement should be inside braces [readability-braces-around-statements] | |
if (show) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4489:12: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (show) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4489:12: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (show) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4489:12: warning: statement should be inside braces [readability-braces-around-statements] | |
if (show) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4496:28: warning: parameter 'ch' is unused [misc-unused-parameters] | |
bool cant_carry(CHAR_DATA *ch, OBJ_DATA *obj) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4496:42: warning: parameter 'obj' is unused [misc-unused-parameters] | |
bool cant_carry(CHAR_DATA *ch, OBJ_DATA *obj) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4498:7: warning: variable 'status' is not initialized [cppcoreguidelines-init-variables] | |
bool status; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4505:6: warning: variable 'i' is not initialized [cppcoreguidelines-init-variables] | |
int i; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4507:7: warning: variable 'status' is not initialized [cppcoreguidelines-init-variables] | |
bool status; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4508:8: warning: variable 'race' is not initialized [cppcoreguidelines-init-variables] | |
char *race; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4513:56: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (str_cmp(obj->owner, "none") && !is_owner(ch, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4513:56: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (str_cmp(obj->owner, "none") && !is_owner(ch, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4513:56: warning: statement should be inside braces [readability-braces-around-statements] | |
if (str_cmp(obj->owner, "none") && !is_owner(ch, obj)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4521:18: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!restricted) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4521:18: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!restricted) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4521:18: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!restricted) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4579:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4580:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4585:8: warning: variable 'tname' is not initialized [cppcoreguidelines-init-variables] | |
char *tname; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4586:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int chance, vlevel; | |
^~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4586:6: warning: variable 'chance' is not initialized [cppcoreguidelines-init-variables] | |
int chance, vlevel; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4586:14: warning: variable 'vlevel' is not initialized [cppcoreguidelines-init-variables] | |
int chance, vlevel; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4621:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_GOOD(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4621:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_GOOD(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4621:22: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_GOOD(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4623:27: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (IS_EVIL(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4623:27: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (IS_EVIL(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4623:27: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (IS_EVIL(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4625:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4625:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4625:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4628:12: warning: 8 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
vlevel += 8; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4628:12: warning: 8 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4709:36: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (obj->wear_loc != WEAR_NONE && IS_SET(obj->extra_flags, ITEM_NOREMOVE)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4716:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->extra_flags, ITEM_NODROP)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4750:17: warning: 24 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
WAIT_STATE(ch, 24); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4750:17: warning: 24 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4768:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (secondary == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4768:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (secondary == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4768:25: warning: statement should be inside braces [readability-braces-around-statements] | |
if (secondary == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4780:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int skill, sn; | |
^~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4780:6: warning: variable 'skill' is not initialized [cppcoreguidelines-init-variables] | |
int skill, sn; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4780:13: warning: variable 'sn' is not initialized [cppcoreguidelines-init-variables] | |
int skill, sn; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4797:37: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (obj->value[0] == WEAPON_DAGGER) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4797:37: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (obj->value[0] == WEAPON_DAGGER) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4797:37: warning: statement should be inside braces [readability-braces-around-statements] | |
if (obj->value[0] == WEAPON_DAGGER) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4799:41: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (obj->value[0] == WEAPON_SWORD) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4799:41: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (obj->value[0] == WEAPON_SWORD) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4799:41: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (obj->value[0] == WEAPON_SWORD) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4801:40: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (obj->value[0] == WEAPON_MACE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4801:40: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (obj->value[0] == WEAPON_MACE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4801:40: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (obj->value[0] == WEAPON_MACE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4803:41: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (obj->value[0] == WEAPON_SPEAR) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4803:41: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (obj->value[0] == WEAPON_SPEAR) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4803:41: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (obj->value[0] == WEAPON_SPEAR) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4805:39: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (obj->value[0] == WEAPON_AXE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4805:39: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (obj->value[0] == WEAPON_AXE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4805:39: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (obj->value[0] == WEAPON_AXE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4807:41: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (obj->value[0] == WEAPON_FLAIL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4807:41: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (obj->value[0] == WEAPON_FLAIL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4807:41: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (obj->value[0] == WEAPON_FLAIL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4809:41: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (obj->value[0] == WEAPON_STAFF) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4809:41: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (obj->value[0] == WEAPON_STAFF) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4809:41: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (obj->value[0] == WEAPON_STAFF) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4811:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4811:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4811:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4819:15: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (skill >= 100) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4819:15: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4819:19: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (skill >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4819:19: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (skill >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4819:19: warning: statement should be inside braces [readability-braces-around-statements] | |
if (skill >= 100) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4821:19: warning: 85 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (skill > 85) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4821:19: warning: 85 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4821:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 85) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4821:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 85) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4821:22: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 85) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4823:19: warning: 70 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (skill > 70) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4823:19: warning: 70 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4823:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 70) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4823:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 70) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4823:22: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 70) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4825:19: warning: 50 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (skill > 50) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4825:19: warning: 50 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4825:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 50) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4825:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 50) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4825:22: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 50) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4827:19: warning: 25 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
else if (skill > 25) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4827:19: warning: 25 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4827:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 25) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4827:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 25) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4827:22: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 25) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4829:21: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (skill > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4829:21: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (skill > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4829:21: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (skill > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4831:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4831:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4831:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4835:53: warning: parameter 'obj' is unused [misc-unused-parameters] | |
void wear_obj_fallen_wings(CHAR_DATA *ch, OBJ_DATA *obj) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4851:2: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
SET_BIT(af.bitvector, AFF_FLYING); | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4140:30: note: expanded from macro 'SET_BIT' | |
#define SET_BIT(var, bit) ((var[(int)bit/32]) |= ((long)pow(2,bit % 32))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4853:13: warning: 51 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.level = 51; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4853:13: warning: 51 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4858:55: warning: parameter 'obj' is unused [misc-unused-parameters] | |
void remove_obj_fallen_wings(CHAR_DATA *ch, OBJ_DATA *obj) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4862:31: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!is_affected(ch, sn_fly)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4862:31: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!is_affected(ch, sn_fly)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4862:31: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!is_affected(ch, sn_fly)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4872:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4873:8: warning: variable 'fp' is not initialized [cppcoreguidelines-init-variables] | |
FILE *fp; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4874:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int i, vnum; | |
^~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4874:6: warning: variable 'i' is not initialized [cppcoreguidelines-init-variables] | |
int i, vnum; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4874:9: warning: variable 'vnum' is not initialized [cppcoreguidelines-init-variables] | |
int i, vnum; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4876:31: warning: use 'fopen' mode 'e' to set O_CLOEXEC [android-cloexec-fopen] | |
fp = fopen(CABAL_ITEMS_FILE, "w"); | |
^~~ | |
"we" | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4887:17: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (vnum == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4887:17: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (vnum == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4887:17: warning: statement should be inside braces [readability-braces-around-statements] | |
if (vnum == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4911:2: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
return false | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4917:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char buf[MSL], buf2[MSL]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4918:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4919:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int i, number, sides; | |
^~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4919:6: warning: variable 'i' is not initialized [cppcoreguidelines-init-variables] | |
int i, number, sides; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4919:9: warning: variable 'number' is not initialized [cppcoreguidelines-init-variables] | |
int i, number, sides; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4919:17: warning: variable 'sides' is not initialized [cppcoreguidelines-init-variables] | |
int i, number, sides; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4963:17: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (number > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4963:17: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (number > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4963:17: warning: statement should be inside braces [readability-braces-around-statements] | |
if (number > 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4965:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4965:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4965:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:4999:12: warning: variable 'coin' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *coin; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5014:58: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (number_percent() < ((get_curr_stat(ch, STAT_DEX) * 10) - 150)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5014:58: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5014:64: warning: 150 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (number_percent() < ((get_curr_stat(ch, STAT_DEX) * 10) - 150)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5014:64: warning: 150 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5022:3: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5051:25: warning: 50 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (number_percent() > 50) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5051:25: warning: 50 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5051:28: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (number_percent() > 50) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5051:28: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (number_percent() > 50) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5051:28: warning: statement should be inside braces [readability-braces-around-statements] | |
if (number_percent() > 50) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5053:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5053:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5053:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5056:22: warning: 25 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (number_range(1, 25) <= get_curr_stat(ch, STAT_DEX)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5056:22: warning: 25 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5063:23: warning: 1000 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (number_range(1, 1000) == 1) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5063:23: warning: 1000 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5082:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
OBJ_DATA *obj, *cont; | |
^~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5082:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj, *cont; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5082:18: warning: variable 'cont' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj, *cont; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5086:37: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (obj->pIndexData->vnum == vnum) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5086:37: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (obj->pIndexData->vnum == vnum) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5086:37: warning: statement should be inside braces [readability-braces-around-statements] | |
if (obj->pIndexData->vnum == vnum) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5091:39: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (cont->pIndexData->vnum == vnum) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5091:39: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (cont->pIndexData->vnum == vnum) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5091:39: warning: statement should be inside braces [readability-braces-around-statements] | |
if (cont->pIndexData->vnum == vnum) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5099:42: warning: parameter 'type' is unused [misc-unused-parameters] | |
bool is_carrying_type(CHAR_DATA *ch, int type) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5101:17: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
for (OBJ_DATA *obj = ch->carrying; obj; obj = obj->next_content) | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5103:35: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (obj->item_type == ITEM_BOAT) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5103:35: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (obj->item_type == ITEM_BOAT) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_obj.c:5103:35: warning: statement should be inside braces [readability-braces-around-statements] | |
if (obj->item_type == ITEM_BOAT) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:44:6: warning: variable 'flag' is not initialized [cppcoreguidelines-init-variables] | |
int flag; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:122:9: warning: narrowing conversion from 'long' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions] | |
flag = wiznet_lookup(argument); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:122:9: warning: narrowing conversion from 'long' to signed type 'int' is implementation-defined [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:174:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:218:2: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:238:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:289:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char arg1[MAX_INPUT_LENGTH], arg2[MAX_INPUT_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:290:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char buf[MAX_STRING_LENGTH], tbuf[MAX_STRING_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:292:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:293:6: warning: variable 'cabal' is not initialized [cppcoreguidelines-init-variables] | |
int cabal; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:294:6: warning: variable 'i' is not initialized [cppcoreguidelines-init-variables] | |
int i; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:313:23: warning: 53 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (get_trust(ch) > 53) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:313:23: warning: 53 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:367:3: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:397:29: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!IS_IMMORTAL(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:397:29: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!IS_IMMORTAL(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:397:29: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!IS_IMMORTAL(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:442:24: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
log_naughty(ch, tstr, 5); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:442:24: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:445:27: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!IS_IMMORTAL(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:445:27: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!IS_IMMORTAL(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:445:27: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!IS_IMMORTAL(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:470:37: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_outfit(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:472:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:473:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int i, body, arms, legs, hands, feet, shield, sn, vnum; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:473:6: warning: variable 'i' is not initialized [cppcoreguidelines-init-variables] | |
int i, body, arms, legs, hands, feet, shield, sn, vnum; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:473:9: warning: variable 'body' is not initialized [cppcoreguidelines-init-variables] | |
int i, body, arms, legs, hands, feet, shield, sn, vnum; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:473:15: warning: variable 'arms' is not initialized [cppcoreguidelines-init-variables] | |
int i, body, arms, legs, hands, feet, shield, sn, vnum; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:473:21: warning: variable 'legs' is not initialized [cppcoreguidelines-init-variables] | |
int i, body, arms, legs, hands, feet, shield, sn, vnum; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:473:27: warning: variable 'hands' is not initialized [cppcoreguidelines-init-variables] | |
int i, body, arms, legs, hands, feet, shield, sn, vnum; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:473:34: warning: variable 'feet' is not initialized [cppcoreguidelines-init-variables] | |
int i, body, arms, legs, hands, feet, shield, sn, vnum; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:473:40: warning: variable 'shield' is not initialized [cppcoreguidelines-init-variables] | |
int i, body, arms, legs, hands, feet, shield, sn, vnum; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:473:48: warning: variable 'sn' is not initialized [cppcoreguidelines-init-variables] | |
int i, body, arms, legs, hands, feet, shield, sn, vnum; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:473:52: warning: variable 'vnum' is not initialized [cppcoreguidelines-init-variables] | |
int i, body, arms, legs, hands, feet, shield, sn, vnum; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:493:10: warning: 24570 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
body = 24570; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:493:10: warning: 24570 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:494:10: warning: 24572 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
arms = 24572; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:494:10: warning: 24572 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:495:10: warning: 24574 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
legs = 24574; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:495:10: warning: 24574 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:496:11: warning: 24576 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
hands = 24576; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:496:11: warning: 24576 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:497:10: warning: 24578 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
feet = 24578; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:497:10: warning: 24578 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:498:12: warning: 24580 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
shield = 24580; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:498:12: warning: 24580 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:502:10: warning: 24571 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
body = 24571; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:502:10: warning: 24571 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:503:10: warning: 24573 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
arms = 24573; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:503:10: warning: 24573 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:504:10: warning: 24575 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
legs = 24575; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:504:10: warning: 24575 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:505:11: warning: 24577 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
hands = 24577; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:505:11: warning: 24577 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:506:10: warning: 24579 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
feet = 24579; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:506:10: warning: 24579 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:507:12: warning: 24580 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
shield = 24580; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:507:12: warning: 24580 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:654:38: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if ((obj == NULL || !IS_WEAPON_STAT(obj, WEAPON_TWO_HANDS)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4211:46: note: expanded from macro 'IS_WEAPON_STAT' | |
#define IS_WEAPON_STAT(obj,stat) (IS_SET_OLD(obj->value[4], stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4139:34: note: expanded from macro 'IS_SET_OLD' | |
#define IS_SET_OLD(flag, bit) (flag & ((long)pow(2,bit))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:673:36: warning: 311 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
obj = create_object(get_obj_index(311), 0); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:673:36: warning: 311 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:677:36: warning: 2794 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
obj = create_object(get_obj_index(2794), 0); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:677:36: warning: 2794 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:681:36: warning: 24534 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
obj = create_object(get_obj_index(24534), 0); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:681:36: warning: 24534 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:692:16: warning: 80 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.duration = 80; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:692:16: warning: 80 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:694:2: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
SET_BIT(af.bitvector, AFF_DARK_VISION); | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4140:30: note: expanded from macro 'SET_BIT' | |
#define SET_BIT(var, bit) ((var[(int)bit/32]) |= ((long)pow(2,bit % 32))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:705:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char arg[MAX_INPUT_LENGTH], buf[MAX_STRING_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:706:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:754:13: warning: variable 'vch' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *vch; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:755:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char *letter, *name; | |
^~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:755:8: warning: variable 'letter' is not initialized [cppcoreguidelines-init-variables] | |
char *letter, *name; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:755:17: warning: variable 'name' is not initialized [cppcoreguidelines-init-variables] | |
char *letter, *name; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:756:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char last[MAX_INPUT_LENGTH], temp[MAX_STRING_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:907:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char arg[MAX_INPUT_LENGTH], buf[MAX_STRING_LENGTH], *cname; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:907:55: warning: variable 'cname' is not initialized [cppcoreguidelines-init-variables] | |
char arg[MAX_INPUT_LENGTH], buf[MAX_STRING_LENGTH], *cname; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:909:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:973:19: warning: variable 'd' is not initialized [cppcoreguidelines-init-variables] | |
DESCRIPTOR_DATA *d; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:974:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:986:14: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
int desc = atoi(arg); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1036:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1092:19: warning: variable 'd' is not initialized [cppcoreguidelines-init-variables] | |
DESCRIPTOR_DATA *d; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1121:19: warning: variable 'd' is not initialized [cppcoreguidelines-init-variables] | |
DESCRIPTOR_DATA *d; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1143:19: warning: variable 'd' is not initialized [cppcoreguidelines-init-variables] | |
DESCRIPTOR_DATA *d; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1170:19: warning: variable 'd' is not initialized [cppcoreguidelines-init-variables] | |
DESCRIPTOR_DATA *d; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1200:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1218:71: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (get_trust(victim) >= get_trust(ch) && get_trust(ch) != MAX_LEVEL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1218:71: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (get_trust(victim) >= get_trust(ch) && get_trust(ch) != MAX_LEVEL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1218:71: warning: statement should be inside braces [readability-braces-around-statements] | |
if (get_trust(victim) >= get_trust(ch) && get_trust(ch) != MAX_LEVEL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1233:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1234:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1236:21: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_number(arg)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1236:21: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_number(arg)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1236:21: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_number(arg)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1237:25: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
return get_room_index(atoi(arg)); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1246:18: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (obj != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1246:18: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (obj != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1246:18: warning: statement should be inside braces [readability-braces-around-statements] | |
if (obj != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1256:19: warning: variable 'location' is not initialized [cppcoreguidelines-init-variables] | |
ROOM_INDEX_DATA *location; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1257:19: warning: variable 'd' is not initialized [cppcoreguidelines-init-variables] | |
DESCRIPTOR_DATA *d; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1258:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1347:19: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (ch != victim) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1347:19: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (ch != victim) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1347:19: warning: statement should be inside braces [readability-braces-around-statements] | |
if (ch != victim) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1358:19: warning: variable 'location' is not initialized [cppcoreguidelines-init-variables] | |
ROOM_INDEX_DATA *location; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1359:19: warning: variable 'original' is not initialized [cppcoreguidelines-init-variables] | |
ROOM_INDEX_DATA *original; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1360:12: warning: variable 'on' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *on; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1361:13: warning: variable 'wch' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *wch; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1416:19: warning: variable 'location' is not initialized [cppcoreguidelines-init-variables] | |
ROOM_INDEX_DATA *location; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1417:13: warning: variable 'rch' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *rch; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1447:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(location->room_flags, ROOM_IMP_ONLY) && get_trust(ch) < 60) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1447:69: warning: 60 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (IS_SET(location->room_flags, ROOM_IMP_ONLY) && get_trust(ch) < 60) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1447:69: warning: 60 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1492:19: warning: variable 'location' is not initialized [cppcoreguidelines-init-variables] | |
ROOM_INDEX_DATA *location; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1493:13: warning: variable 'rch' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *rch; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1554:8: warning: variable 'string' is not initialized [cppcoreguidelines-init-variables] | |
char *string; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1555:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1556:19: warning: variable 'location' is not initialized [cppcoreguidelines-init-variables] | |
ROOM_INDEX_DATA *location; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1557:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1630:19: warning: variable 'location' is not initialized [cppcoreguidelines-init-variables] | |
ROOM_INDEX_DATA *location; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1631:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1632:13: warning: variable 'rch' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *rch; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1633:8: warning: variable 'direction' is not initialized [cppcoreguidelines-init-variables] | |
char *direction; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1634:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int door, i = 0, counter = 0, time = 0; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1634:6: warning: variable 'door' is not initialized [cppcoreguidelines-init-variables] | |
int door, i = 0, counter = 0, time = 0; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1670:21: warning: variable 'ed' is not initialized [cppcoreguidelines-init-variables] | |
EXTRA_DESCR_DATA *ed; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1677:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (ed->next != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1677:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (ed->next != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1677:25: warning: statement should be inside braces [readability-braces-around-statements] | |
if (ed->next != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1706:25: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
for (door = 0; door <= 5; door++) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1706:25: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1708:14: warning: variable 'pexit' is not initialized [cppcoreguidelines-init-variables] | |
EXIT_DATA *pexit; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1709:13: warning: 500 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
char ebuf[500]; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1709:13: warning: 500 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1710:7: warning: variable 'i' is not initialized [cppcoreguidelines-init-variables] | |
int i; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1745:12: warning: 24 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
: (24 + time_info.hour - location->tracks[i]->time.hour) + | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1745:12: warning: 24 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1747:11: warning: 24 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
? 24 * (time_info.day - location->tracks[i]->time.day) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1747:11: warning: 24 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1748:11: warning: 24 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
: 24 * (30 + time_info.day - location->tracks[i]->time.day) + | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1748:11: warning: 24 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1748:17: warning: 30 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
: 24 * (30 + time_info.day - location->tracks[i]->time.day) + | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1748:17: warning: 30 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1750:14: warning: 24 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
? 24 * 30 * (time_info.month - location->tracks[i]->time.month) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1750:14: warning: 24 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1750:19: warning: 30 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
? 24 * 30 * (time_info.month - location->tracks[i]->time.month) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1750:19: warning: 30 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1751:14: warning: 24 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
: 24 * 30 * (12 + time_info.month - location->tracks[i]->time.month) + | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1751:14: warning: 24 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1751:19: warning: 30 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
: 24 * 30 * (12 + time_info.month - location->tracks[i]->time.month) + | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1751:19: warning: 30 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1751:25: warning: 12 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
: 24 * 30 * (12 + time_info.month - location->tracks[i]->time.month) + | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1751:25: warning: 12 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1752:12: warning: 24 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
24 * 30 * 12 * (time_info.year - location->tracks[i]->time.year); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1752:12: warning: 24 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1752:17: warning: 30 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
24 * 30 * 12 * (time_info.year - location->tracks[i]->time.year); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1752:17: warning: 30 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1752:22: warning: 12 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
24 * 30 * 12 * (time_info.year - location->tracks[i]->time.year); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1752:22: warning: 12 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1763:19: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (counter == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1763:19: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (counter == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1763:19: warning: statement should be inside braces [readability-braces-around-statements] | |
if (counter == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1771:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char buf[MAX_STRING_LENGTH], arg[MAX_INPUT_LENGTH], buf2[MSL]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1772:19: warning: variable 'paf' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_AFFECT_DATA *paf; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1773:18: warning: variable 'app' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_APPLY_DATA *app; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1774:15: warning: variable 'paf2' is not initialized [cppcoreguidelines-init-variables] | |
AFFECT_DATA *paf2; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:1775:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2019:3: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
EXTRA_DESCR_DATA *ed, *ed2; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2019:21: warning: variable 'ed' is not initialized [cppcoreguidelines-init-variables] | |
EXTRA_DESCR_DATA *ed, *ed2; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2019:26: warning: variable 'ed2' is not initialized [cppcoreguidelines-init-variables] | |
EXTRA_DESCR_DATA *ed, *ed2; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2028:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (ed->next != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2028:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (ed->next != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2028:25: warning: statement should be inside braces [readability-braces-around-statements] | |
if (ed->next != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2036:45: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!str_cmp(ed->keyword, ed2->keyword)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2036:45: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!str_cmp(ed->keyword, ed2->keyword)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2036:45: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!str_cmp(ed->keyword, ed2->keyword)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2040:18: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (duplicate) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2040:18: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (duplicate) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2040:18: warning: statement should be inside braces [readability-braces-around-statements] | |
if (duplicate) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2045:25: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (ed->next != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2045:25: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (ed->next != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2045:25: warning: statement should be inside braces [readability-braces-around-statements] | |
if (ed->next != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2054:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->progtypes, IPROG_WEAR)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2060:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->progtypes, IPROG_REMOVE)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2066:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->progtypes, IPROG_GET)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2072:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->progtypes, IPROG_DROP)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2078:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->progtypes, IPROG_SAC)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2084:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->progtypes, IPROG_GIVE)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2090:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->progtypes, IPROG_FIGHT)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2096:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->progtypes, IPROG_DEATH)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2102:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->progtypes, IPROG_SPEECH)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2108:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->progtypes, IPROG_PULSE)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2114:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->progtypes, IPROG_ENTRY)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2120:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->progtypes, IPROG_INVOKE)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2126:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->progtypes, IPROG_GREET)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2132:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(obj->progtypes, IPROG_VERB)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2141:7: warning: variable 'i' is not initialized [cppcoreguidelines-init-variables] | |
int i; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2142:8: warning: variable 'x' is not initialized [cppcoreguidelines-init-variables] | |
long x; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2146:68: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (ispec_table[i].spec_func == obj->pIndexData->spec_prog.func) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2146:68: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (ispec_table[i].spec_func == obj->pIndexData->spec_prog.func) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2146:68: warning: statement should be inside braces [readability-braces-around-statements] | |
if (ispec_table[i].spec_func == obj->pIndexData->spec_prog.func) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2160:19: warning: 1073741824 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
for (x = 1; x < 1073741824; x = x * 2) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2160:19: warning: 1073741824 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2162:8: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (ispec_table[i].spec_events & x) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2243:32: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (paf->aftype == AFT_SKILL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2243:32: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (paf->aftype == AFT_SKILL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2243:32: warning: statement should be inside braces [readability-braces-around-statements] | |
if (paf->aftype == AFT_SKILL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2245:37: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (paf->aftype == AFT_POWER) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2245:37: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (paf->aftype == AFT_POWER) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2245:37: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (paf->aftype == AFT_POWER) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2247:39: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (paf->aftype == AFT_COMMUNE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2247:39: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (paf->aftype == AFT_COMMUNE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2247:39: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (paf->aftype == AFT_COMMUNE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2249:36: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (paf->aftype == AFT_RUNE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2249:36: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (paf->aftype == AFT_RUNE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2249:36: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (paf->aftype == AFT_RUNE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2251:7: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2251:7: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2251:7: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2274:36: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_astat(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2278:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
AREA_DATA *area, *pArea; | |
^~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2278:13: warning: variable 'area' is not initialized [cppcoreguidelines-init-variables] | |
AREA_DATA *area, *pArea; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2278:20: warning: variable 'pArea' is not initialized [cppcoreguidelines-init-variables] | |
AREA_DATA *area, *pArea; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2279:20: warning: variable 'paf' is not initialized [cppcoreguidelines-init-variables] | |
AREA_AFFECT_DATA *paf; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2408:17: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (count == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2408:17: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (count == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2408:17: warning: statement should be inside braces [readability-braces-around-statements] | |
if (count == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2410:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2410:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2410:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2419:33: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (paf->aftype == AFT_SKILL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2419:33: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (paf->aftype == AFT_SKILL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2419:33: warning: statement should be inside braces [readability-braces-around-statements] | |
if (paf->aftype == AFT_SKILL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2421:38: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (paf->aftype == AFT_POWER) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2421:38: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (paf->aftype == AFT_POWER) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2421:38: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (paf->aftype == AFT_POWER) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2423:40: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (paf->aftype == AFT_COMMUNE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2423:40: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (paf->aftype == AFT_COMMUNE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2423:40: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (paf->aftype == AFT_COMMUNE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2425:8: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2425:8: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2425:8: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2451:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char cred[MSL], tbuf[MSL]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2453:15: warning: variable 'paf' is not initialized [cppcoreguidelines-init-variables] | |
AFFECT_DATA *paf; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2454:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2455:19: warning: variable 'barred' is not initialized [cppcoreguidelines-init-variables] | |
ROOM_INDEX_DATA *barred; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2456:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int i, x; | |
^~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2456:6: warning: variable 'i' is not initialized [cppcoreguidelines-init-variables] | |
int i, x; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2456:9: warning: variable 'x' is not initialized [cppcoreguidelines-init-variables] | |
int i, x; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2779:7: warning: variable 'i' is not initialized [cppcoreguidelines-init-variables] | |
int i; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2780:8: warning: variable 'x' is not initialized [cppcoreguidelines-init-variables] | |
long x; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2797:19: warning: 1073741824 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
for (x = 1; x < 1073741824; x = x * 2) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2797:19: warning: 1073741824 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2799:8: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (mspec_table[i].spec_events & x) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2896:10: warning: variable 'profPSN' is not initialized [cppcoreguidelines-init-variables] | |
auto profPSN = victim->pIndexData->profs_taught[i]; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2897:11: warning: variable 'profName' is not initialized [cppcoreguidelines-init-variables] | |
char* profName = ch->Profs()->GetProficiency(profPSN).name; //prof_table[victim->pIndexData->profs_taught[i]].name | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2906:20: warning: 9 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
for (i = 0; i <= 9; i++) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2906:20: warning: 9 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2921:15: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!barred) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2921:15: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!barred) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2921:15: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!barred) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2975:32: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (paf->aftype == AFT_SPELL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2975:32: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (paf->aftype == AFT_SPELL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2975:32: warning: statement should be inside braces [readability-braces-around-statements] | |
if (paf->aftype == AFT_SPELL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2976:4: warning: repeated branch in conditional chain [bugprone-branch-clone] | |
sprintf(buf2, "Spell"); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2976:26: note: end of the original | |
sprintf(buf2, "Spell"); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2992:4: note: clone 1 starts here | |
sprintf(buf2, "Spell"); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2977:37: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (paf->aftype == AFT_SKILL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2977:37: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (paf->aftype == AFT_SKILL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2977:37: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (paf->aftype == AFT_SKILL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2979:37: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (paf->aftype == AFT_POWER) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2979:37: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (paf->aftype == AFT_POWER) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2979:37: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (paf->aftype == AFT_POWER) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2981:38: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (paf->aftype == AFT_MALADY) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2981:38: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (paf->aftype == AFT_MALADY) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2981:38: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (paf->aftype == AFT_MALADY) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2983:39: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (paf->aftype == AFT_COMMUNE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2983:39: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (paf->aftype == AFT_COMMUNE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2983:39: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (paf->aftype == AFT_COMMUNE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2985:37: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (paf->aftype == AFT_INVIS) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2985:37: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (paf->aftype == AFT_INVIS) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2985:37: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (paf->aftype == AFT_INVIS) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2987:36: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (paf->aftype == AFT_RUNE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2987:36: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (paf->aftype == AFT_RUNE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2987:36: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (paf->aftype == AFT_RUNE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2989:37: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (paf->aftype == AFT_TIMER) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2989:37: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (paf->aftype == AFT_TIMER) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2989:37: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (paf->aftype == AFT_TIMER) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2991:7: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2991:7: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:2991:7: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3021:19: warning: 20 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
for (i = 0; i < 20; i++) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3021:19: warning: 20 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3034:8: warning: variable 'string' is not initialized [cppcoreguidelines-init-variables] | |
char *string; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3072:13: warning: redundant 'top_mob_index' declaration [readability-redundant-declaration] | |
extern int top_mob_index; | |
~~~~~~~~~~~^~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/db.h:83:12: note: previously declared here | |
extern int top_mob_index; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3075:18: warning: variable 'pMobIndex' is not initialized [cppcoreguidelines-init-variables] | |
MOB_INDEX_DATA *pMobIndex; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3076:6: warning: variable 'vnum' is not initialized [cppcoreguidelines-init-variables] | |
int vnum; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3077:6: warning: variable 'nMatch' is not initialized [cppcoreguidelines-init-variables] | |
int nMatch; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3078:7: warning: variable 'fAll' is not initialized [cppcoreguidelines-init-variables] | |
bool fAll; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3079:7: warning: variable 'found' is not initialized [cppcoreguidelines-init-variables] | |
bool found; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3115:13: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3115:13: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3115:13: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3121:13: warning: redundant 'top_obj_index' declaration [readability-redundant-declaration] | |
extern int top_obj_index; | |
~~~~~~~~~~~^~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/db.h:84:12: note: previously declared here | |
extern int top_obj_index; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3124:18: warning: variable 'pObjIndex' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_INDEX_DATA *pObjIndex; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3125:6: warning: variable 'vnum' is not initialized [cppcoreguidelines-init-variables] | |
int vnum; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3126:6: warning: variable 'nMatch' is not initialized [cppcoreguidelines-init-variables] | |
int nMatch; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3127:7: warning: variable 'fAll' is not initialized [cppcoreguidelines-init-variables] | |
bool fAll; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3128:7: warning: variable 'found' is not initialized [cppcoreguidelines-init-variables] | |
bool found; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3163:13: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3163:13: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3163:13: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3167:37: warning: pointer parameter 'argument' can be pointer to const [readability-non-const-parameter] | |
void do_owhere(CHAR_DATA *ch, char *argument) | |
^ | |
const | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3170:10: warning: variable 'buffer' is not initialized [cppcoreguidelines-init-variables] | |
BUFFER *buffer; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3171:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3172:12: warning: variable 'in_obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *in_obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3173:7: warning: variable 'found' is not initialized [cppcoreguidelines-init-variables] | |
bool found; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3174:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int number = 0, max_found; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3174:18: warning: variable 'max_found' is not initialized [cppcoreguidelines-init-variables] | |
int number = 0, max_found; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3178:14: warning: 200 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
max_found = 200; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3178:14: warning: 200 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3195:70: warning: statement should be inside braces [google-readability-braces-around-statements] | |
for (in_obj = obj; in_obj->in_obj != NULL; in_obj = in_obj->in_obj) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3195:70: warning: statement should be inside braces [hicpp-braces-around-statements] | |
for (in_obj = obj; in_obj->in_obj != NULL; in_obj = in_obj->in_obj) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3195:70: warning: statement should be inside braces [readability-braces-around-statements] | |
for (in_obj = obj; in_obj->in_obj != NULL; in_obj = in_obj->in_obj) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3224:27: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (number >= max_found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3224:27: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (number >= max_found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3224:27: warning: statement should be inside braces [readability-braces-around-statements] | |
if (number >= max_found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3228:13: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3228:13: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3228:13: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3230:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3230:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3230:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3239:10: warning: variable 'buffer' is not initialized [cppcoreguidelines-init-variables] | |
BUFFER *buffer; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3240:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3241:7: warning: variable 'found' is not initialized [cppcoreguidelines-init-variables] | |
bool found; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3246:20: warning: variable 'd' is not initialized [cppcoreguidelines-init-variables] | |
DESCRIPTOR_DATA *d; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3262:5: warning: if with identical then and else branches [bugprone-branch-clone] | |
if (d->original != NULL) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3271:5: note: else branch starts here | |
else | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3309:13: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3309:13: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3309:13: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3311:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3311:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3311:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3317:36: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_reboo(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3321:2: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] | |
return; | |
~~~~~~~~^~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3326:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
DESCRIPTOR_DATA *d, *d_next; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3326:19: warning: variable 'd' is not initialized [cppcoreguidelines-init-variables] | |
DESCRIPTOR_DATA *d, *d_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3326:23: warning: variable 'd_next' is not initialized [cppcoreguidelines-init-variables] | |
DESCRIPTOR_DATA *d, *d_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3328:13: warning: variable 'vch' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *vch; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3375:41: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_affected(vch, gsn_cloak_form)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3375:41: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_affected(vch, gsn_cloak_form)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3375:41: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_affected(vch, gsn_cloak_form)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3404:20: warning: 6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (reboot_num < 6 || (reboot_num % 5 == 0)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3404:20: warning: 6 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3404:39: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (reboot_num < 6 || (reboot_num % 5 == 0)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3404:39: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3417:14: warning: redundant 'rebooting' declaration [readability-redundant-declaration] | |
extern bool rebooting; | |
~~~~~~~~~~~~^~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3391:14: note: previously declared here | |
extern bool rebooting; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3418:13: warning: redundant 'reboot_num' declaration [readability-redundant-declaration] | |
extern int reboot_num; | |
~~~~~~~~~~~^~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3390:13: note: previously declared here | |
extern int reboot_num; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3421:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char arg1[MSL], area[MSL] = ""; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3426:9: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
mins = atoi(arg1); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3430:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(pArea->area_flags, AREA_CHANGED) || IS_SET(pArea->area_flags, AREA_ADDED)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3430:50: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(pArea->area_flags, AREA_CHANGED) || IS_SET(pArea->area_flags, AREA_ADDED)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3478:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3512:19: warning: variable 'd' is not initialized [cppcoreguidelines-init-variables] | |
DESCRIPTOR_DATA *d; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3513:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3601:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char arg[MAX_INPUT_LENGTH], buf[MAX_STRING_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3602:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3676:37: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_return(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3712:49: warning: 20 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
|| (IS_TRUSTED(ch, IMMORTAL) && obj->level <= 20 && obj->cost <= 1000) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3712:49: warning: 20 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3712:68: warning: 1000 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
|| (IS_TRUSTED(ch, IMMORTAL) && obj->level <= 20 && obj->cost <= 1000) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3712:68: warning: 1000 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3713:45: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
|| (IS_TRUSTED(ch, DEMI) && obj->level <= 10 && obj->cost <= 500) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3713:45: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3713:64: warning: 500 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
|| (IS_TRUSTED(ch, DEMI) && obj->level <= 10 && obj->cost <= 500) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3713:64: warning: 500 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3714:46: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
|| (IS_TRUSTED(ch, ANGEL) && obj->level <= 5 && obj->cost <= 250) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3714:46: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3714:64: warning: 250 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
|| (IS_TRUSTED(ch, ANGEL) && obj->level <= 5 && obj->cost <= 250) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3714:64: warning: 250 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3715:65: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
|| (IS_TRUSTED(ch, AVATAR) && obj->level == 0 && obj->cost <= 100)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3715:65: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3715:70: warning: statement should be inside braces [google-readability-braces-around-statements] | |
|| (IS_TRUSTED(ch, AVATAR) && obj->level == 0 && obj->cost <= 100)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3715:70: warning: statement should be inside braces [hicpp-braces-around-statements] | |
|| (IS_TRUSTED(ch, AVATAR) && obj->level == 0 && obj->cost <= 100)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3715:70: warning: statement should be inside braces [readability-braces-around-statements] | |
|| (IS_TRUSTED(ch, AVATAR) && obj->level == 0 && obj->cost <= 100)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3717:2: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
return false | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3717:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3717:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3717:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3724:12: warning: variable 't_obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *t_obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3742:8: warning: variable 'rest' is not initialized [cppcoreguidelines-init-variables] | |
char *rest; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3743:13: warning: variable 'mob' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *mob; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3744:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3790:13: warning: variable 'clone' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *clone; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3801:31: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (obj->carried_by != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3801:31: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (obj->carried_by != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3801:31: warning: statement should be inside braces [readability-braces-around-statements] | |
if (obj->carried_by != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3803:7: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3803:7: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3803:7: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3815:14: warning: variable 'clone' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *clone; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3816:13: warning: variable 'new_obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *new_obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3895:18: warning: variable 'pMobIndex' is not initialized [cppcoreguidelines-init-variables] | |
MOB_INDEX_DATA *pMobIndex; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3896:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3907:28: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
pMobIndex = get_mob_index(atoi(arg)); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3929:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char arg1[MAX_INPUT_LENGTH], arg2[MAX_INPUT_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3930:18: warning: variable 'pObjIndex' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_INDEX_DATA *pObjIndex; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3931:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3932:6: warning: variable 'level' is not initialized [cppcoreguidelines-init-variables] | |
int level; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3953:11: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
level = atoi(arg2); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3962:28: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
pObjIndex = get_obj_index(atoi(arg1)); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3972:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (CAN_WEAR(obj, ITEM_TAKE)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4209:32: note: expanded from macro 'CAN_WEAR' | |
#define CAN_WEAR(obj, part) (IS_SET(obj->wear_flags, part)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3972:31: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (CAN_WEAR(obj, ITEM_TAKE)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3972:31: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (CAN_WEAR(obj, ITEM_TAKE)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3972:31: warning: statement should be inside braces [readability-braces-around-statements] | |
if (CAN_WEAR(obj, ITEM_TAKE)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3974:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3974:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3974:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3986:11: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
char buf[100]; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3986:11: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3987:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3988:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3989:19: warning: variable 'd' is not initialized [cppcoreguidelines-init-variables] | |
DESCRIPTOR_DATA *d; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3996:14: warning: variable 'vnext' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *vnext; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3997:13: warning: variable 'obj_next' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4011:9: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (!IS_OBJ_STAT(obj, ITEM_NOPURGE)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4210:34: note: expanded from macro 'IS_OBJ_STAT' | |
#define IS_OBJ_STAT(obj, stat) (IS_SET(obj->extra_flags, stat)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4011:40: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!IS_OBJ_STAT(obj, ITEM_NOPURGE)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4011:40: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!IS_OBJ_STAT(obj, ITEM_NOPURGE)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4011:40: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!IS_OBJ_STAT(obj, ITEM_NOPURGE)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4052:17: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (d != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4052:17: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (d != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4052:17: warning: statement should be inside braces [readability-braces-around-statements] | |
if (d != NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4067:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4068:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int level, res = 0; | |
^~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4068:6: warning: variable 'level' is not initialized [cppcoreguidelines-init-variables] | |
int level, res = 0; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4069:6: warning: variable 'iLevel' is not initialized [cppcoreguidelines-init-variables] | |
int iLevel; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4094:10: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
level = atoi(arg2); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4096:27: warning: 60 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (level < 1 || level > 60) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4096:27: warning: 60 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4117:7: warning: variable 'temp_prac' is not initialized [cppcoreguidelines-init-variables] | |
int temp_prac; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4163:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4164:6: warning: variable 'level' is not initialized [cppcoreguidelines-init-variables] | |
int level; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4183:10: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
level = atoi(arg2); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4185:27: warning: 60 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (level < 0 || level > 60) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4185:27: warning: 60 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4202:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char arg[MAX_INPUT_LENGTH], buf[MAX_STRING_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4203:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4204:13: warning: variable 'vch' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *vch; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4205:19: warning: variable 'd' is not initialized [cppcoreguidelines-init-variables] | |
DESCRIPTOR_DATA *d; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4264:45: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!argument || !str_cmp(argument, "")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4264:45: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!argument || !str_cmp(argument, "")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4264:45: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!argument || !str_cmp(argument, "")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4266:9: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4266:9: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4266:9: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4306:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char arg[MAX_INPUT_LENGTH], buf[MAX_STRING_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4307:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4360:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4417:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char arg[MAX_INPUT_LENGTH], buf[MAX_STRING_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4418:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4462:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char arg[MAX_INPUT_LENGTH], buf[MAX_STRING_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4463:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4517:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char arg[MAX_INPUT_LENGTH], buf[MAX_STRING_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4518:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4564:36: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_peace(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4566:18: warning: variable 'rch' is not initialized [cppcoreguidelines-init-variables] | |
for (CHAR_DATA *rch = ch->in_room->people; rch != NULL; rch = rch->next_in_room) | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4581:38: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_wizlock(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4583:14: warning: redundant 'wizlock' declaration [readability-redundant-declaration] | |
extern bool wizlock; | |
~~~~~~~~~~~~^~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:40:13: note: previously declared here | |
extern bool wizlock; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4600:38: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_newlock(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4621:6: warning: variable 'sn' is not initialized [cppcoreguidelines-init-variables] | |
int sn; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4635:37: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (skill_table[sn].name == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4635:37: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (skill_table[sn].name == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4635:37: warning: statement should be inside braces [readability-braces-around-statements] | |
if (skill_table[sn].name == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4715:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4716:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int gn, i; | |
^~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4716:6: warning: variable 'gn' is not initialized [cppcoreguidelines-init-variables] | |
int gn, i; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4716:10: warning: variable 'i' is not initialized [cppcoreguidelines-init-variables] | |
int gn, i; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4780:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4781:6: warning: variable 'value' is not initialized [cppcoreguidelines-init-variables] | |
int value; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4782:6: warning: variable 'sn' is not initialized [cppcoreguidelines-init-variables] | |
int sn; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4783:7: warning: variable 'fAll' is not initialized [cppcoreguidelines-init-variables] | |
bool fAll; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4830:10: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
value = atoi(arg3); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4832:28: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if ((value < 0 || value > 100) && (value != -2)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4832:28: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4857:11: warning: 300 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
char buf[300]; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4857:11: warning: 300 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4858:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4859:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int value, i; | |
^~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4859:6: warning: variable 'value' is not initialized [cppcoreguidelines-init-variables] | |
int value, i; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4859:13: warning: variable 'i' is not initialized [cppcoreguidelines-init-variables] | |
int value, i; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4894:28: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
value = is_number(arg3) ? atoi(arg3) : -1; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4905:14: warning: 60 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.level = 60; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4905:14: warning: 60 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4906:17: warning: 12 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.duration = 12; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4906:17: warning: 12 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4912:2: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else if (!str_cmp(arg2, "beauty")) | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4914:28: warning: 11 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (value > 0 && value < 11) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4914:28: warning: 11 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4919:3: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^ | |
note: this fix will not be applied because it overlaps with another fix | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4957:3: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4966:28: warning: 20000 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (value < 0 || value > 20000) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4966:28: warning: 20000 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4997:28: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (value < 0 || value > 10) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:4997:28: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5085:7: warning: variable 'sclass' is not initialized [cppcoreguidelines-init-variables] | |
int sclass = CClass::Lookup(arg3); | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5093:20: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (sclass > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5093:20: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (sclass > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5093:20: warning: statement should be inside braces [readability-braces-around-statements] | |
if (sclass > 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5117:28: warning: 60 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (value < 0 || value > 60) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5117:28: warning: 60 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5135:16: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (value < -10 || value > 30000) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5135:16: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5135:30: warning: 30000 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (value < -10 || value > 30000) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5135:30: warning: 30000 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5151:28: warning: 30000 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (value < 0 || value > 30000) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5151:28: warning: 30000 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5167:28: warning: 30000 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (value < 0 || value > 30000) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5167:28: warning: 30000 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5183:28: warning: 250 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (value < 0 || value > 250) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5183:28: warning: 250 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5195:28: warning: 50 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (value < 0 || value > 50) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5195:28: warning: 50 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5207:16: warning: 1000 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (value < -1000 || value > 1000) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5207:16: warning: 1000 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5207:32: warning: 1000 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (value < -1000 || value > 1000) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5207:32: warning: 1000 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5219:16: warning: 1000 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (value < -1000 || value > 1000) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5219:16: warning: 1000 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5219:32: warning: 1000 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (value < -1000 || value > 1000) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5219:32: warning: 1000 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5239:29: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (value < -1 || value > 100) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5239:29: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5257:29: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (value < -1 || value > 100) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5257:29: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5275:29: warning: 100 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (value < -1 || value > 100) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5275:29: warning: 100 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5335:53: warning: 59 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (!str_prefix(arg2, "tribe") && get_trust(ch) >= 59) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5335:53: warning: 59 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5398:7: warning: variable 'ind' is not initialized [cppcoreguidelines-init-variables] | |
int ind = CProficiencies::ProfIndexLookup(buf4); | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5406:42: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
if (ind < 0 || !is_number(argument) || atoi(argument) > 10 || atoi(argument) < -1) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5406:59: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (ind < 0 || !is_number(argument) || atoi(argument) > 10 || atoi(argument) < -1) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5406:59: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5406:65: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
if (ind < 0 || !is_number(argument) || atoi(argument) > 10 || atoi(argument) < -1) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5445:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5446:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5555:22: warning: variable 'ed' is not initialized [cppcoreguidelines-init-variables] | |
EXTRA_DESCR_DATA *ed; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5586:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5587:6: warning: variable 'value' is not initialized [cppcoreguidelines-init-variables] | |
int value; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5615:10: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
value = atoi(arg3); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5686:19: warning: variable 'location' is not initialized [cppcoreguidelines-init-variables] | |
ROOM_INDEX_DATA *location; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5687:6: warning: variable 'value' is not initialized [cppcoreguidelines-init-variables] | |
int value; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5727:10: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
value = atoi(arg3); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5750:19: warning: variable 'd' is not initialized [cppcoreguidelines-init-variables] | |
DESCRIPTOR_DATA *d; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5751:6: warning: variable 'count' is not initialized [cppcoreguidelines-init-variables] | |
int count; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5757:32: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!strcmp(argument, "show")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5757:32: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!strcmp(argument, "show")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5757:32: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!strcmp(argument, "show")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5820:2: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] | |
return; | |
~~~~~~~~^~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5832:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (host[i] != '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5832:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (host[i] != '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5832:22: warning: statement should be inside braces [readability-braces-around-statements] | |
if (host[i] != '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5843:41: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_multicheck(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5847:19: warning: variable 'd' is not initialized [cppcoreguidelines-init-variables] | |
DESCRIPTOR_DATA *d; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5848:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int count = 0, i = 0, j = 0; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5849:20: warning: 80 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
MULTDATA CHARLIST[80]; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5849:20: warning: 80 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5861:11: warning: 80 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (i > 80) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5861:11: warning: 80 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5937:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5946:21: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (victim == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5946:21: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (victim == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5946:21: warning: statement should be inside braces [readability-braces-around-statements] | |
if (victim == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5949:21: warning: 24 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
WAIT_STATE(victim, 24); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5949:21: warning: 24 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5957:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
CHAR_DATA *vch, *vch_next; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5957:13: warning: variable 'vch' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *vch, *vch_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5957:19: warning: variable 'vch_next' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *vch, *vch_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5994:27: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!can_see(vch, ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5994:27: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!can_see(vch, ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:5994:27: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!can_see(vch, ch)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6003:2: warning: repeated branch in conditional chain [bugprone-branch-clone] | |
{ | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6020:3: note: end of the original | |
} | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6022:2: note: clone 1 starts here | |
{ | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6097:6: warning: variable 'level' is not initialized [cppcoreguidelines-init-variables] | |
int level; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6125:11: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
level = atoi(arg); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6132:3: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6146:6: warning: variable 'level' is not initialized [cppcoreguidelines-init-variables] | |
int level; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6172:11: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
level = atoi(arg); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6179:3: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6189:40: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_holylight(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6208:36: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_prefi(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6248:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6249:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
AFFECT_DATA *af, *af_next; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6249:15: warning: variable 'af' is not initialized [cppcoreguidelines-init-variables] | |
AFFECT_DATA *af, *af_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6249:20: warning: variable 'af_next' is not initialized [cppcoreguidelines-init-variables] | |
AFFECT_DATA *af, *af_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6254:21: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (arg[0] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6254:21: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (arg[0] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6254:21: warning: statement should be inside braces [readability-braces-around-statements] | |
if (arg[0] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6256:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6256:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6256:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6269:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(af->bitvector, AFF_PERMANENT)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6269:44: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_SET(af->bitvector, AFF_PERMANENT)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6269:44: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_SET(af->bitvector, AFF_PERMANENT)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6269:44: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_SET(af->bitvector, AFF_PERMANENT)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6275:19: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (victim != ch) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6275:19: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (victim != ch) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6275:19: warning: statement should be inside braces [readability-braces-around-statements] | |
if (victim != ch) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6277:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6277:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6277:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6283:18: warning: variable 'pObjIndex' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_INDEX_DATA *pObjIndex; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6284:11: warning: 200 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
char buf[200]; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6284:11: warning: 200 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6285:6: warning: variable 'vnum' is not initialized [cppcoreguidelines-init-variables] | |
int vnum; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6293:9: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
vnum = atoi(argument); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6308:38: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_classes(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6311:6: warning: variable 'iRace' is not initialized [cppcoreguidelines-init-variables] | |
int iRace; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6312:6: warning: variable 'iClass' is not initialized [cppcoreguidelines-init-variables] | |
int iClass; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6316:34: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!race_table[iRace].pc_race) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6316:34: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!race_table[iRace].pc_race) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6316:34: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!race_table[iRace].pc_race) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6339:19: warning: variable 'location' is not initialized [cppcoreguidelines-init-variables] | |
ROOM_INDEX_DATA *location; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6355:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(location->area->area_flags, AREA_EXPLORE)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6355:55: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_SET(location->area->area_flags, AREA_EXPLORE)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6355:55: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_SET(location->area->area_flags, AREA_EXPLORE)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6355:55: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_SET(location->area->area_flags, AREA_EXPLORE)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6358:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(location->area->area_flags, AREA_NO_NEWBIES)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6358:58: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_SET(location->area->area_flags, AREA_NO_NEWBIES)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6358:58: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_SET(location->area->area_flags, AREA_NO_NEWBIES)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6358:58: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_SET(location->area->area_flags, AREA_NO_NEWBIES)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6361:6: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(location->area->area_flags, AREA_UNGHOST)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6361:55: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_SET(location->area->area_flags, AREA_UNGHOST)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6361:55: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_SET(location->area->area_flags, AREA_UNGHOST)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6361:55: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_SET(location->area->area_flags, AREA_UNGHOST)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6374:67: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (location->room_flags == 0 && location->area->area_flags == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6374:67: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (location->room_flags == 0 && location->area->area_flags == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6374:67: warning: statement should be inside braces [readability-braces-around-statements] | |
if (location->room_flags == 0 && location->area->area_flags == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6418:18: warning: variable 'pobj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_INDEX_DATA *pobj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6419:6: warning: variable 'vnum' is not initialized [cppcoreguidelines-init-variables] | |
int vnum; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6431:21: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_number(arg)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6431:21: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_number(arg)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6431:21: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_number(arg)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6432:10: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
vnum = atoi(arg); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6470:2: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6480:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6481:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
AFFECT_DATA *paf, *paf_next, af; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6481:15: warning: variable 'paf' is not initialized [cppcoreguidelines-init-variables] | |
AFFECT_DATA *paf, *paf_next, af; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6481:21: warning: variable 'paf_next' is not initialized [cppcoreguidelines-init-variables] | |
AFFECT_DATA *paf, *paf_next, af; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6482:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
OBJ_APPLY_DATA *app, *app_next; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6482:18: warning: variable 'app' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_APPLY_DATA *app, *app_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6482:24: warning: variable 'app_next' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_APPLY_DATA *app, *app_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6486:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int modifier, location; | |
^~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6486:6: warning: variable 'modifier' is not initialized [cppcoreguidelines-init-variables] | |
int modifier, location; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6486:16: warning: variable 'location' is not initialized [cppcoreguidelines-init-variables] | |
int modifier, location; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6535:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (arg3[0] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6535:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (arg3[0] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6535:22: warning: statement should be inside braces [readability-braces-around-statements] | |
if (arg3[0] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6538:30: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!str_prefix(arg2, "hp")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6538:30: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!str_prefix(arg2, "hp")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6538:30: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!str_prefix(arg2, "hp")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6540:36: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (!str_prefix(arg2, "str")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6540:36: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (!str_prefix(arg2, "str")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6540:36: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (!str_prefix(arg2, "str")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6542:36: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (!str_prefix(arg2, "dex")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6542:36: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (!str_prefix(arg2, "dex")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6542:36: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (!str_prefix(arg2, "dex")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6544:36: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (!str_prefix(arg2, "int")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6544:36: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (!str_prefix(arg2, "int")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6544:36: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (!str_prefix(arg2, "int")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6546:36: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (!str_prefix(arg2, "wis")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6546:36: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (!str_prefix(arg2, "wis")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6546:36: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (!str_prefix(arg2, "wis")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6548:36: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (!str_prefix(arg2, "con")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6548:36: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (!str_prefix(arg2, "con")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6548:36: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (!str_prefix(arg2, "con")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6550:37: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (!str_prefix(arg2, "mana")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6550:37: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (!str_prefix(arg2, "mana")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6550:37: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (!str_prefix(arg2, "mana")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6552:37: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (!str_prefix(arg2, "move")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6552:37: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (!str_prefix(arg2, "move")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6552:37: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (!str_prefix(arg2, "move")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6554:35: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (!str_prefix(arg2, "ac")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6554:35: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (!str_prefix(arg2, "ac")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6554:35: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (!str_prefix(arg2, "ac")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6556:40: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (!str_prefix(arg2, "hitroll")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6556:40: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (!str_prefix(arg2, "hitroll")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6556:40: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (!str_prefix(arg2, "hitroll")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6558:40: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (!str_prefix(arg2, "damroll")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6558:40: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (!str_prefix(arg2, "damroll")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6558:40: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (!str_prefix(arg2, "damroll")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6560:38: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (!str_prefix(arg2, "saves")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6560:38: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (!str_prefix(arg2, "saves")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6560:38: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (!str_prefix(arg2, "saves")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6562:39: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else if (!str_prefix(arg2, "affect")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6562:39: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else if (!str_prefix(arg2, "affect")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6562:39: warning: statement should be inside braces [readability-braces-around-statements] | |
else if (!str_prefix(arg2, "affect")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6577:15: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
modifier = atoi(arg3); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6614:8: warning: variable 'fp' is not initialized [cppcoreguidelines-init-variables] | |
FILE *fp; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6615:8: warning: variable 'strtime' is not initialized [cppcoreguidelines-init-variables] | |
char *strtime; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6620:27: warning: use 'fopen' mode 'e' to set O_CLOEXEC [android-cloexec-fopen] | |
fp = fopen(GOD_LOG_FILE, "a"); | |
^~~ | |
"ae" | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6643:8: warning: variable 'choppedarg' is not initialized [cppcoreguidelines-init-variables] | |
char *choppedarg; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6674:18: warning: variable 'pMobIndex' is not initialized [cppcoreguidelines-init-variables] | |
MOB_INDEX_DATA *pMobIndex; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6675:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6686:28: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
pMobIndex = get_mob_index(atoi(arg)); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6706:13: warning: redundant 'top_obj_index' declaration [readability-redundant-declaration] | |
extern int top_obj_index; | |
~~~~~~~~~~~^~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:3121:13: note: previously declared here | |
extern int top_obj_index; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6710:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6712:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int vnum, nMatch = 0; | |
^~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6712:6: warning: variable 'vnum' is not initialized [cppcoreguidelines-init-variables] | |
int vnum, nMatch = 0; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6713:8: warning: variable 'blah' is not initialized [cppcoreguidelines-init-variables] | |
char *blah; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6724:29: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
pObjIndex = get_obj_index(atoi(arg1)); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6778:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6779:6: warning: variable 'len' is not initialized [cppcoreguidelines-init-variables] | |
int len; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6842:3: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6897:14: warning: narrowing conversion from 'unsigned long' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions] | |
for (len = strlen(obuf); len > 0; len--) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6897:14: warning: narrowing conversion from 'unsigned long' to signed type 'int' is implementation-defined [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6933:8: warning: variable 'strtime' is not initialized [cppcoreguidelines-init-variables] | |
char *strtime; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6958:10: warning: variable 'output' is not initialized [cppcoreguidelines-init-variables] | |
BUFFER *output; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:6978:10: warning: variable 'output' is not initialized [cppcoreguidelines-init-variables] | |
BUFFER *output; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7016:27: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (argument[0] != '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7016:27: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (argument[0] != '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7016:27: warning: statement should be inside braces [readability-braces-around-statements] | |
if (argument[0] != '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7018:7: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7018:7: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7018:7: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7030:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7072:3: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7094:3: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7107:39: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_raffects(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7109:20: warning: variable 'paf' is not initialized [cppcoreguidelines-init-variables] | |
ROOM_AFFECT_DATA *paf; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7110:13: warning: variable 'rune' is not initialized [cppcoreguidelines-init-variables] | |
RUNE_DATA *rune; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7122:33: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (paf->aftype == AFT_SPELL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7122:33: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (paf->aftype == AFT_SPELL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7122:33: warning: statement should be inside braces [readability-braces-around-statements] | |
if (paf->aftype == AFT_SPELL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7125:33: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (paf->aftype == AFT_SKILL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7125:33: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (paf->aftype == AFT_SKILL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7125:33: warning: statement should be inside braces [readability-braces-around-statements] | |
if (paf->aftype == AFT_SKILL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7128:33: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (paf->aftype == AFT_POWER) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7128:33: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (paf->aftype == AFT_POWER) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7128:33: warning: statement should be inside braces [readability-braces-around-statements] | |
if (paf->aftype == AFT_POWER) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7131:35: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (paf->aftype == AFT_COMMUNE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7131:35: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (paf->aftype == AFT_COMMUNE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7131:35: warning: statement should be inside braces [readability-braces-around-statements] | |
if (paf->aftype == AFT_COMMUNE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7135:61: warning: statement should be inside braces [google-readability-braces-around-statements] | |
paf->aftype != AFT_MALADY && paf->aftype != AFT_COMMUNE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7135:61: warning: statement should be inside braces [hicpp-braces-around-statements] | |
paf->aftype != AFT_MALADY && paf->aftype != AFT_COMMUNE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7135:61: warning: statement should be inside braces [readability-braces-around-statements] | |
paf->aftype != AFT_MALADY && paf->aftype != AFT_COMMUNE) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7164:18: warning: 6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
for (i = 0; i < 6; i++) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7164:18: warning: 6 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7181:13: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7181:13: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7181:13: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7187:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
ROOM_AFFECT_DATA *af, *af_next; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7187:20: warning: variable 'af' is not initialized [cppcoreguidelines-init-variables] | |
ROOM_AFFECT_DATA *af, *af_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7187:25: warning: variable 'af_next' is not initialized [cppcoreguidelines-init-variables] | |
ROOM_AFFECT_DATA *af, *af_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7208:38: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_aastrip(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7210:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
AREA_AFFECT_DATA *af, *af_next; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7210:20: warning: variable 'af' is not initialized [cppcoreguidelines-init-variables] | |
AREA_AFFECT_DATA *af, *af_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7210:25: warning: variable 'af_next' is not initialized [cppcoreguidelines-init-variables] | |
AREA_AFFECT_DATA *af, *af_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7211:13: warning: variable 'area' is not initialized [cppcoreguidelines-init-variables] | |
AREA_DATA *area = ch->in_room->area; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7224:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7225:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
OBJ_AFFECT_DATA *af, *af_next; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7225:19: warning: variable 'af' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_AFFECT_DATA *af, *af_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7225:24: warning: variable 'af_next' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_AFFECT_DATA *af, *af_next; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7235:2: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7250:7: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
if (IS_SET(af->bitvector, AFF_PERMANENT)) | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4138:30: note: expanded from macro 'IS_SET' | |
#define IS_SET(flag, bit) ((flag[(int)(bit/32)]) & ((long)pow(2,(bit % 32)))) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7250:44: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_SET(af->bitvector, AFF_PERMANENT)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7250:44: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_SET(af->bitvector, AFF_PERMANENT)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7250:44: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_SET(af->bitvector, AFF_PERMANENT)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7261:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char arg1[MSL], arg2[MSL], temp[MSL]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7262:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7263:6: warning: variable 'xp' is not initialized [cppcoreguidelines-init-variables] | |
int xp; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7288:7: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
xp = atoi(arg2); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7290:11: warning: 3000 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (xp > 3000 && get_trust(ch) < 56) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7290:11: warning: 3000 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7290:35: warning: 56 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (xp > 3000 && get_trust(ch) < 56) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7290:35: warning: 56 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7296:29: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!str_cmp(argument, "")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7296:29: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!str_cmp(argument, "")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7296:29: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!str_cmp(argument, "")) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7298:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7298:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7298:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7315:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char arg1[MSL], temp[MSL]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7316:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7367:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7368:6: warning: variable 'i' is not initialized [cppcoreguidelines-init-variables] | |
int i; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7370:26: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (argument[0] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7370:26: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (argument[0] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7370:26: warning: statement should be inside braces [readability-braces-around-statements] | |
if (argument[0] == '\0') | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7372:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7372:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7372:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7391:38: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_gsnlist(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7393:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int sn, col = 0; | |
^~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7393:6: warning: variable 'sn' is not initialized [cppcoreguidelines-init-variables] | |
int sn, col = 0; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7395:10: warning: variable 'output' is not initialized [cppcoreguidelines-init-variables] | |
BUFFER *output; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7401:36: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (skill_table[sn].name == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7401:36: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (skill_table[sn].name == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7401:36: warning: statement should be inside braces [readability-braces-around-statements] | |
if (skill_table[sn].name == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7407:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (++col % 3 == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7407:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (++col % 3 == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7407:22: warning: statement should be inside braces [readability-braces-around-statements] | |
if (++col % 3 == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7420:39: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_noskills(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7438:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char arg1[MSL], arg2[MSL], query[MSL], str[200]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7438:45: warning: 200 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
char arg1[MSL], arg2[MSL], query[MSL], str[200]; | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7438:45: warning: 200 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7476:57: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
sprintf(query, "SELECT * from buglist WHERE ID = %d", atoi(arg1)); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7477:43: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
sprintf(str, "Displaying bug #%d:\n\r", atoi(arg1)); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7511:69: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
sprintf(query, "SELECT * from buglist ORDER BY ID desc LIMIT %d", atoi(arg2)); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7512:48: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
sprintf(str, "Displaying last %d bugs.\n\r", atoi(arg2)); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7532:65: warning: 'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead [cert-err34-c] | |
sprintf(query, "UPDATE buglist SET Status = 1 WHERE ID = %d", atoi(arg2)); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7593:40: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_constdump(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7595:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
FILE *fp = fopen(RIFT_CODE_DIR "/constdump.txt", "w"), *fp2; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7595:51: warning: use 'fopen' mode 'e' to set O_CLOEXEC [android-cloexec-fopen] | |
FILE *fp = fopen(RIFT_CODE_DIR "/constdump.txt", "w"), *fp2; | |
^ | |
note: this fix will not be applied because it overlaps with another fix | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7595:58: warning: variable 'fp2' is not initialized [cppcoreguidelines-init-variables] | |
FILE *fp = fopen(RIFT_CODE_DIR "/constdump.txt", "w"), *fp2; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7596:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int sn, i; | |
^~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7596:6: warning: variable 'sn' is not initialized [cppcoreguidelines-init-variables] | |
int sn, i; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7596:10: warning: variable 'i' is not initialized [cppcoreguidelines-init-variables] | |
int sn, i; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7598:10: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!fp) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7598:10: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!fp) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7598:10: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!fp) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7639:4: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
skill_table[sn].dispel & CAN_DISPEL ? "CAN_DISPEL" : "", | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7639:29: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
skill_table[sn].dispel & CAN_DISPEL ? "CAN_DISPEL" : "", | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:1062:25: note: expanded from macro 'CAN_DISPEL' | |
#define CAN_DISPEL (1 << A) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7640:4: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
skill_table[sn].dispel & CAN_CANCEL ? "CAN_CANCEL" : "", | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7640:29: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
skill_table[sn].dispel & CAN_CANCEL ? "CAN_CANCEL" : "", | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:1063:25: note: expanded from macro 'CAN_CANCEL' | |
#define CAN_CANCEL (1 << B) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7641:4: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
skill_table[sn].dispel & CAN_CLEANSE ? "CAN_CLEANSE" : "", | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7641:29: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
skill_table[sn].dispel & CAN_CLEANSE ? "CAN_CLEANSE" : "", | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:1064:26: note: expanded from macro 'CAN_CLEANSE' | |
#define CAN_CLEANSE (1 << C) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7642:4: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
skill_table[sn].dispel & CAN_PURIFY ? "CAN_PURIFY" : "", | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7642:29: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
skill_table[sn].dispel & CAN_PURIFY ? "CAN_PURIFY" : "", | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:1065:25: note: expanded from macro 'CAN_PURIFY' | |
#define CAN_PURIFY (1 << D) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7659:41: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (skill_table[sn].target == TAR_END) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7659:41: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (skill_table[sn].target == TAR_END) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7659:41: warning: statement should be inside braces [readability-braces-around-statements] | |
if (skill_table[sn].target == TAR_END) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7668:31: warning: parameter 'ch' is unused [misc-unused-parameters] | |
void do_interpdump(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7668:41: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_interpdump(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7670:52: warning: use 'fopen' mode 'e' to set O_CLOEXEC [android-cloexec-fopen] | |
FILE *fp = fopen(RIFT_CODE_DIR "/interpdump.txt", "w"); | |
^~~ | |
"we" | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7671:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int i = 0, j = 0, k = 0; | |
^~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7678:30: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (cmd_table[i].show == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7678:30: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (cmd_table[i].show == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7678:30: warning: statement should be inside braces [readability-braces-around-statements] | |
if (cmd_table[i].show == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7681:30: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (cmd_table[i].hide == 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7681:30: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (cmd_table[i].hide == 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7681:30: warning: statement should be inside braces [readability-braces-around-statements] | |
if (cmd_table[i].hide == 1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7688:48: warning: use 'fopen' mode 'e' to set O_CLOEXEC [android-cloexec-fopen] | |
fp = fopen(RIFT_CODE_DIR "/climate-dump.txt", "w"); | |
^~~ | |
"we" | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7730:39: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_racedump(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7732:49: warning: use 'fopen' mode 'e' to set O_CLOEXEC [android-cloexec-fopen] | |
FILE *fp = fopen(RIFT_CODE_DIR "/racdump.txt", "w"); | |
^~~ | |
"we" | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7733:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int race = 0, i = 0; | |
^~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7744:19: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
for (i = 0; i < 10; i++) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7744:19: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7746:43: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (race_table[race].act[i] != NO_FLAG) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7746:43: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (race_table[race].act[i] != NO_FLAG) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7746:43: warning: statement should be inside braces [readability-braces-around-statements] | |
if (race_table[race].act[i] != NO_FLAG) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7747:17: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
SET_BIT_OLD(temp_bit, race_table[race].act[i]); | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4141:34: note: expanded from macro 'SET_BIT_OLD' | |
#define SET_BIT_OLD(var, bit) (var |= (long)pow(2,bit)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7753:19: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
for (i = 0; i < 10; i++) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7753:19: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7755:43: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (race_table[race].aff[i] != NO_FLAG) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7755:43: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (race_table[race].aff[i] != NO_FLAG) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7755:43: warning: statement should be inside braces [readability-braces-around-statements] | |
if (race_table[race].aff[i] != NO_FLAG) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7756:17: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
SET_BIT_OLD(temp_bit, race_table[race].aff[i]); | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4141:34: note: expanded from macro 'SET_BIT_OLD' | |
#define SET_BIT_OLD(var, bit) (var |= (long)pow(2,bit)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7762:19: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
for (i = 0; i < 10; i++) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7762:19: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7764:43: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (race_table[race].off[i] != NO_FLAG) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7764:43: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (race_table[race].off[i] != NO_FLAG) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7764:43: warning: statement should be inside braces [readability-braces-around-statements] | |
if (race_table[race].off[i] != NO_FLAG) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7765:17: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
SET_BIT_OLD(temp_bit, race_table[race].off[i]); | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4141:34: note: expanded from macro 'SET_BIT_OLD' | |
#define SET_BIT_OLD(var, bit) (var |= (long)pow(2,bit)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7771:19: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
for (i = 0; i < 10; i++) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7771:19: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7773:43: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (race_table[race].imm[i] != NO_FLAG) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7773:43: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (race_table[race].imm[i] != NO_FLAG) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7773:43: warning: statement should be inside braces [readability-braces-around-statements] | |
if (race_table[race].imm[i] != NO_FLAG) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7774:17: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
SET_BIT_OLD(temp_bit, race_table[race].imm[i]); | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4141:34: note: expanded from macro 'SET_BIT_OLD' | |
#define SET_BIT_OLD(var, bit) (var |= (long)pow(2,bit)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7780:19: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
for (i = 0; i < 10; i++) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7780:19: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7782:43: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (race_table[race].res[i] != NO_FLAG) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7782:43: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (race_table[race].res[i] != NO_FLAG) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7782:43: warning: statement should be inside braces [readability-braces-around-statements] | |
if (race_table[race].res[i] != NO_FLAG) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7783:17: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
SET_BIT_OLD(temp_bit, race_table[race].res[i]); | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4141:34: note: expanded from macro 'SET_BIT_OLD' | |
#define SET_BIT_OLD(var, bit) (var |= (long)pow(2,bit)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7789:19: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
for (i = 0; i < 10; i++) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7789:19: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7791:44: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (race_table[race].vuln[i] != NO_FLAG) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7791:44: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (race_table[race].vuln[i] != NO_FLAG) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7791:44: warning: statement should be inside braces [readability-braces-around-statements] | |
if (race_table[race].vuln[i] != NO_FLAG) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7792:17: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
SET_BIT_OLD(temp_bit, race_table[race].vuln[i]); | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4141:34: note: expanded from macro 'SET_BIT_OLD' | |
#define SET_BIT_OLD(var, bit) (var |= (long)pow(2,bit)) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7798:19: warning: 15 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
for (i = 0; i < 15; i++) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7798:19: warning: 15 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7802:34: warning: narrowing conversion from 'long' to 'double' [bugprone-narrowing-conversions] | |
temp_bit += (long int)pow(2, race_table[race].form[i]); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7802:34: warning: narrowing conversion from 'long' to 'double' [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7803:70: warning: narrowing conversion from 'long' to 'double' [bugprone-narrowing-conversions] | |
sprintf(buf, "(FORM) %d-%d = %ld\n\r", race, i, (long int)pow(2, race_table[race].parts[i])); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7803:70: warning: narrowing conversion from 'long' to 'double' [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7811:19: warning: 15 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
for (i = 0; i < 15; i++) | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7811:19: warning: 15 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7815:34: warning: narrowing conversion from 'long' to 'double' [bugprone-narrowing-conversions] | |
temp_bit += (long int)pow(2, race_table[race].parts[i]); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7815:34: warning: narrowing conversion from 'long' to 'double' [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7816:71: warning: narrowing conversion from 'long' to 'double' [bugprone-narrowing-conversions] | |
sprintf(buf, "(PARTS) %d-%d = %ld\n\r", race, i, (long int)pow(2, race_table[race].parts[i])); | |
^ | |
/home/sgilliam/src/riftshadow/code/act_wiz.c:7816:71: warning: narrowing conversion from 'long' to 'double' [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/alias.c:39:13: warning: variable 'ch' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *ch; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/alias.c:40:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char buf[MAX_STRING_LENGTH], name[MAX_INPUT_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/alias.c:41:8: warning: variable 'point' is not initialized [cppcoreguidelines-init-variables] | |
char *point; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/alias.c:42:6: warning: variable 'alias' is not initialized [cppcoreguidelines-init-variables] | |
int alias; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/alias.c:88:35: warning: parameter 'argument' is unused [misc-unused-parameters] | |
void do_alia(CHAR_DATA *ch, char *argument) | |
^ | |
/home/sgilliam/src/riftshadow/code/alias.c:95:13: warning: variable 'rch' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *rch; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/alias.c:96:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char arg[MAX_INPUT_LENGTH], buf[MAX_STRING_LENGTH]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/alias.c:97:6: warning: variable 'pos' is not initialized [cppcoreguidelines-init-variables] | |
int pos; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/alias.c:195:13: warning: variable 'rch' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *rch; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/alias.c:197:6: warning: variable 'pos' is not initialized [cppcoreguidelines-init-variables] | |
int pos; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/alias.c:244:13: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/alias.c:244:13: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/alias.c:244:13: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!found) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:4:48: warning: parameter 'victim' is unused [misc-unused-parameters] | |
void check_bloodlust(CHAR_DATA *ch, CHAR_DATA *victim) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:6:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
AFFECT_DATA *af_old, af; | |
^~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/ap.c:6:15: warning: variable 'af_old' is not initialized [cppcoreguidelines-init-variables] | |
AFFECT_DATA *af_old, af; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/ap.c:7:6: warning: variable 'skill' is not initialized [cppcoreguidelines-init-variables] | |
int skill; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/ap.c:8:6: warning: variable 'level' is not initialized [cppcoreguidelines-init-variables] | |
int level = ch->level; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/ap.c:32:17: warning: 96 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.duration = 96; | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:32:17: warning: 96 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:48:41: warning: 6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
check_improve(ch, gsn_bloodlust, true, 6); | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:48:41: warning: 6 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:53:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int leeched, skill; | |
^~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/ap.c:53:6: warning: variable 'leeched' is not initialized [cppcoreguidelines-init-variables] | |
int leeched, skill; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/ap.c:53:15: warning: variable 'skill' is not initialized [cppcoreguidelines-init-variables] | |
int leeched, skill; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/ap.c:55:60: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if ((skill = get_skill(ch, gsn_leech)) < number_percent()) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:55:60: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if ((skill = get_skill(ch, gsn_leech)) < number_percent()) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:55:60: warning: statement should be inside braces [readability-braces-around-statements] | |
if ((skill = get_skill(ch, gsn_leech)) < number_percent()) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:69:37: warning: 6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
check_improve(ch, gsn_leech, true, 6); | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:69:37: warning: 6 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:72:31: warning: parameter 'sn' is unused [misc-unused-parameters] | |
void spell_indomitability(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:72:67: warning: parameter 'vo' is unused [misc-unused-parameters] | |
void spell_indomitability(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:72:75: warning: parameter 'target' is unused [misc-unused-parameters] | |
void spell_indomitability(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:85:24: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.duration = level / 5; | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:85:24: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:93:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/ap.c:94:6: warning: variable 'chance' is not initialized [cppcoreguidelines-init-variables] | |
int chance; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/ap.c:110:50: warning: 20 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
chance = get_skill(ch, skill_lookup("taunt")) - 20; | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:110:50: warning: 20 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:113:13: warning: 50 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
chance -= 50; | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:113:13: warning: 50 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:139:66: warning: parameter 'target' is unused [misc-unused-parameters] | |
void spell_wrack(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:161:16: warning: 20 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.modifier = 20; | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:161:16: warning: 20 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:177:61: warning: parameter 'vo' is unused [misc-unused-parameters] | |
void spell_radiance(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:177:69: warning: parameter 'target' is unused [misc-unused-parameters] | |
void spell_radiance(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:198:24: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.duration = level / 10; | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:198:24: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:205:60: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (number_percent() > (4 * get_curr_stat(ch, STAT_CON) - 5)) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:205:60: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:212:73: warning: parameter 'target' is unused [misc-unused-parameters] | |
void spell_inspire_lust(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:226:12: warning: 15 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
level -= 15; | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:226:12: warning: 15 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:242:25: warning: 6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.duration = level / 6; | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:242:25: warning: 6 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:246:2: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else if (victim != ch) | |
^~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/ap.c:273:25: warning: 6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.duration = level / 6; | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:273:25: warning: 6 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:278:45: warning: parameter 'af' is unused [misc-unused-parameters] | |
void lust_pulse(CHAR_DATA *ch, AFFECT_DATA *af) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:280:12: warning: variable 'steal' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *steal; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/ap.c:281:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/ap.c:283:6: warning: variable 'skill' is not initialized [cppcoreguidelines-init-variables] | |
int skill; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/ap.c:288:55: warning: 0.8 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
skill = (int)(get_skill(ch, skill_lookup("steal")) * 0.8); | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:288:55: warning: 0.8 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:290:17: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (skill == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:290:17: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (skill == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:290:17: warning: statement should be inside braces [readability-braces-around-statements] | |
if (skill == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:291:11: warning: 50 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
skill = 50; | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:291:11: warning: 50 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:295:80: warning: 95 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if ((victim == ch) || (is_safe_new(victim, ch, false)) || number_percent() < 95) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:295:80: warning: 95 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:295:83: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if ((victim == ch) || (is_safe_new(victim, ch, false)) || number_percent() < 95) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:295:83: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if ((victim == ch) || (is_safe_new(victim, ch, false)) || number_percent() < 95) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:295:83: warning: statement should be inside braces [readability-braces-around-statements] | |
if ((victim == ch) || (is_safe_new(victim, ch, false)) || number_percent() < 95) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:300:86: warning: 95 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (steal->wear_loc != WEAR_NONE || !can_see_obj(ch, steal) || number_percent() < 95) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:300:86: warning: 95 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:300:89: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (steal->wear_loc != WEAR_NONE || !can_see_obj(ch, steal) || number_percent() < 95) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:300:89: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (steal->wear_loc != WEAR_NONE || !can_see_obj(ch, steal) || number_percent() < 95) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:300:89: warning: statement should be inside braces [readability-braces-around-statements] | |
if (steal->wear_loc != WEAR_NONE || !can_see_obj(ch, steal) || number_percent() < 95) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:325:26: warning: parameter 'sn' is unused [misc-unused-parameters] | |
void spell_dispaters(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:325:34: warning: parameter 'level' is unused [misc-unused-parameters] | |
void spell_dispaters(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:325:62: warning: parameter 'vo' is unused [misc-unused-parameters] | |
void spell_dispaters(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:325:70: warning: parameter 'target' is unused [misc-unused-parameters] | |
void spell_dispaters(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:327:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/ap.c:328:12: warning: variable 'obj' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *obj; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/ap.c:329:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char buf[MSL], arg[MAX_INPUT_LENGTH], buf2[MSL]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/ap.c:357:12: warning: variable 'corpse' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *corpse; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/ap.c:414:30: warning: parameter 'sn' is unused [misc-unused-parameters] | |
void spell_baals_mastery(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:414:38: warning: parameter 'level' is unused [misc-unused-parameters] | |
void spell_baals_mastery(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:414:66: warning: parameter 'vo' is unused [misc-unused-parameters] | |
void spell_baals_mastery(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:414:74: warning: parameter 'target' is unused [misc-unused-parameters] | |
void spell_baals_mastery(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:417:6: warning: variable 'weapon' is not initialized [cppcoreguidelines-init-variables] | |
int weapon; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/ap.c:464:2: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
SET_BIT(af.bitvector, AFF_PERMANENT); | |
^ | |
/home/sgilliam/src/riftshadow/code/merc.h:4140:30: note: expanded from macro 'SET_BIT' | |
#define SET_BIT(var, bit) ((var[(int)bit/32]) |= ((long)pow(2,bit % 32))) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:473:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
AFFECT_DATA *af, af2; | |
^~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/ap.c:473:15: warning: variable 'af' is not initialized [cppcoreguidelines-init-variables] | |
AFFECT_DATA *af, af2; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/ap.c:474:12: warning: variable 'weapon' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_DATA *weapon; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/ap.c:477:17: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (skill == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:477:17: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (skill == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:477:17: warning: statement should be inside braces [readability-braces-around-statements] | |
if (skill == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:480:42: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!is_affected(ch, gsn_baals_mastery)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:480:42: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!is_affected(ch, gsn_baals_mastery)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:480:42: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!is_affected(ch, gsn_baals_mastery)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:489:46: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!(weapon = get_eq_char(ch, WEAR_WIELD))) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:489:46: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!(weapon = get_eq_char(ch, WEAR_WIELD))) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:489:46: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!(weapon = get_eq_char(ch, WEAR_WIELD))) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:492:39: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (weapon->value[0] != af->modifier) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:492:39: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (weapon->value[0] != af->modifier) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:492:39: warning: statement should be inside braces [readability-braces-around-statements] | |
if (weapon->value[0] != af->modifier) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:495:14: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (skill / 10 <= number_percent()) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:495:14: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:495:37: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (skill / 10 <= number_percent()) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:495:37: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (skill / 10 <= number_percent()) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:495:37: warning: statement should be inside braces [readability-braces-around-statements] | |
if (skill / 10 <= number_percent()) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:505:88: warning: 150 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
one_hit_new(ch, victim, TYPE_UNDEFINED, HIT_NOSPECIALS, HIT_UNBLOCKABLE, HIT_NOADD, 150, NULL); | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:505:88: warning: 150 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:512:88: warning: 150 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
one_hit_new(ch, victim, TYPE_UNDEFINED, HIT_NOSPECIALS, HIT_UNBLOCKABLE, HIT_NOADD, 150, NULL); | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:512:88: warning: 150 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:519:88: warning: 150 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
one_hit_new(ch, victim, TYPE_UNDEFINED, HIT_NOSPECIALS, HIT_UNBLOCKABLE, HIT_NOADD, 150, NULL); | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:519:88: warning: 150 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:526:88: warning: 200 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
one_hit_new(ch, victim, TYPE_UNDEFINED, HIT_NOSPECIALS, HIT_UNBLOCKABLE, HIT_NOADD, 200, NULL); | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:526:88: warning: 200 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:528:27: warning: 40 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (number_percent() < 40 && !is_affected(victim, gsn_bleeding)) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:528:27: warning: 40 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:540:20: warning: 6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af2.duration = 6; | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:540:20: warning: 6 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:552:88: warning: 175 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
one_hit_new(ch, victim, TYPE_UNDEFINED, HIT_NOSPECIALS, HIT_UNBLOCKABLE, HIT_NOADD, 175, NULL); | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:552:88: warning: 175 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:558:45: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
check_improve(ch, gsn_baals_mastery, true, 5); | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:558:45: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:560:2: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] | |
return; | |
~~~~~~~~^~~~~~~ | |
/home/sgilliam/src/riftshadow/code/ap.c:563:32: warning: parameter 'sn' is unused [misc-unused-parameters] | |
void spell_word_of_command(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:563:68: warning: parameter 'vo' is unused [misc-unused-parameters] | |
void spell_word_of_command(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:563:76: warning: parameter 'target' is unused [misc-unused-parameters] | |
void spell_word_of_command(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:565:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
char arg1[MSL], arg2[MSL], buf[MSL]; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/ap.c:567:13: warning: variable 'victim' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *victim; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/ap.c:602:36: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (is_safe_new(ch, victim, true)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:602:36: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (is_safe_new(ch, victim, true)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:602:36: warning: statement should be inside braces [readability-braces-around-statements] | |
if (is_safe_new(ch, victim, true)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:638:26: warning: 20 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (saves_spell(level + 20 - get_curr_stat(victim, STAT_INT), victim, DAM_CHARM)) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:638:26: warning: 20 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:675:44: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!is_affected(ch, gsn_word_of_command)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:675:44: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!is_affected(ch, gsn_word_of_command)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:675:44: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!is_affected(ch, gsn_word_of_command)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:703:30: warning: parameter 'sn' is unused [misc-unused-parameters] | |
void spell_mark_of_wrath(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:703:74: warning: parameter 'target' is unused [misc-unused-parameters] | |
void spell_mark_of_wrath(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:737:22: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (IS_GOOD(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:737:22: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (IS_GOOD(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:737:22: warning: statement should be inside braces [readability-braces-around-statements] | |
if (IS_GOOD(victim)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:738:31: warning: 0.8 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.duration = (int)(level * 0.8); | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:738:31: warning: 0.8 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:739:6: warning: statement should be inside braces [google-readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:739:6: warning: statement should be inside braces [hicpp-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:739:6: warning: statement should be inside braces [readability-braces-around-statements] | |
else | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:740:31: warning: 0.4 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.duration = (int)(level * 0.4); | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:740:31: warning: 0.4 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:748:2: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] | |
return; | |
~~~~~~~~^~~~~~~ | |
/home/sgilliam/src/riftshadow/code/ap.c:751:29: warning: parameter 'sn' is unused [misc-unused-parameters] | |
void spell_living_blade(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:751:73: warning: parameter 'target' is unused [misc-unused-parameters] | |
void spell_living_blade(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:788:13: warning: variable 'ch' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *ch; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/ap.c:789:19: warning: variable 'af2' is not initialized [cppcoreguidelines-init-variables] | |
OBJ_AFFECT_DATA *af2; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/ap.c:791:37: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if ((ch = obj->carried_by) == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:791:37: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if ((ch = obj->carried_by) == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:791:37: warning: statement should be inside braces [readability-braces-around-statements] | |
if ((ch = obj->carried_by) == NULL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:796:26: warning: 7 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (number_percent() < 7 && af->location == APPLY_DAMROLL) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:796:26: warning: 7 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:870:2: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else if (!ch->fighting) | |
^~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/ap.c:875:73: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!(obj->wear_loc == WEAR_WIELD || obj->wear_loc == WEAR_DUAL_WIELD)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:875:73: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!(obj->wear_loc == WEAR_WIELD || obj->wear_loc == WEAR_DUAL_WIELD)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:875:73: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!(obj->wear_loc == WEAR_WIELD || obj->wear_loc == WEAR_DUAL_WIELD)) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:911:25: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
if (number_percent() < 10 && af2->location == APPLY_DAMROLL) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:911:25: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:930:36: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (af->location == APPLY_HITROLL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:930:36: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (af->location == APPLY_HITROLL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:930:36: warning: statement should be inside braces [readability-braces-around-statements] | |
if (af->location == APPLY_HITROLL) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:933:23: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (!obj->carried_by) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:933:23: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (!obj->carried_by) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:933:23: warning: statement should be inside braces [readability-braces-around-statements] | |
if (!obj->carried_by) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:949:18: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af->duration = 10; | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:949:18: warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:954:30: warning: parameter 'sn' is unused [misc-unused-parameters] | |
void spell_dark_familiar(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:954:38: warning: parameter 'level' is unused [misc-unused-parameters] | |
void spell_dark_familiar(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:954:66: warning: parameter 'vo' is unused [misc-unused-parameters] | |
void spell_dark_familiar(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:954:74: warning: parameter 'target' is unused [misc-unused-parameters] | |
void spell_dark_familiar(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:956:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
CHAR_DATA *fam, *check; | |
^~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/ap.c:956:13: warning: variable 'fam' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *fam, *check; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/ap.c:956:19: warning: variable 'check' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *fam, *check; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/ap.c:960:6: warning: variable 'vnum' is not initialized [cppcoreguidelines-init-variables] | |
int vnum; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/ap.c:961:6: warning: variable 'i' is not initialized [cppcoreguidelines-init-variables] | |
int i; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/ap.c:1001:14: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions] | |
hp_mod = 1.5; | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:1001:14: warning: 1.5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:1001:14: warning: narrowing conversion from 'double' to 'float' [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/ap.c:1001:14: warning: 1.5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:1006:14: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions] | |
hp_mod = 2.5; | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:1006:14: warning: 2.5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:1006:14: warning: narrowing conversion from 'double' to 'float' [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/ap.c:1006:14: warning: 2.5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:1011:13: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions] | |
hp_mod = 0.75; | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:1011:13: warning: 0.75 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:1011:13: warning: narrowing conversion from 'double' to 'float' [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/ap.c:1011:13: warning: 0.75 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:1019:13: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions] | |
hp_mod = 0.667; | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:1019:13: warning: 0.667 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:1019:13: warning: narrowing conversion from 'double' to 'float' [cppcoreguidelines-narrowing-conversions] | |
/home/sgilliam/src/riftshadow/code/ap.c:1019:13: warning: 0.667 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:1062:16: warning: 64 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.duration = 64; | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:1062:16: warning: 64 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:1067:33: warning: parameter 'sn' is unused [misc-unused-parameters] | |
void spell_unholy_communion(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:1067:69: warning: parameter 'vo' is unused [misc-unused-parameters] | |
void spell_unholy_communion(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:1067:77: warning: parameter 'target' is unused [misc-unused-parameters] | |
void spell_unholy_communion(int sn, int level, CHAR_DATA *ch, void *vo, int target) | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:1104:16: warning: 12 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.duration = 12; | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:1104:16: warning: 12 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:1113:24: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (af->duration == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:1113:24: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (af->duration == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:1113:24: warning: statement should be inside braces [readability-braces-around-statements] | |
if (af->duration == 0) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:1122:19: warning: 96 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
timer.duration = 96; | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:1122:19: warning: 96 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:1128:19: warning: variable 'd' is not initialized [cppcoreguidelines-init-variables] | |
DESCRIPTOR_DATA *d; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/ap.c:1129:15: warning: variable 'af' is not initialized [cppcoreguidelines-init-variables] | |
AFFECT_DATA *af; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/ap.c:1130:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int demon = -1, type = -1; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/ap.c:1131:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int *typeptr = NULL, *demonptr = NULL; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/ap.c:1132:6: warning: variable 'i' is not initialized [cppcoreguidelines-init-variables] | |
int i; | |
^ | |
= 0 | |
/home/sgilliam/src/riftshadow/code/ap.c:1134:8: warning: variable 'said' is not initialized [cppcoreguidelines-init-variables] | |
char *said; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/ap.c:1140:30: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (af->aftype == AFT_TIMER) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:1140:30: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (af->aftype == AFT_TIMER) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:1140:30: warning: statement should be inside braces [readability-braces-around-statements] | |
if (af->aftype == AFT_TIMER) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:1158:4: warning: do not use 'else' after 'break' [readability-else-after-return] | |
else if (demon_table[i].type == GREATER_DEMON && ch->level > 34) | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/ap.c:1173:17: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (type == -1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:1173:17: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (type == -1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:1173:17: warning: statement should be inside braces [readability-braces-around-statements] | |
if (type == -1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:1255:17: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
WAIT_STATE(ch, 5 * PULSE_VIOLENCE); | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:1255:17: warning: 5 is a magic number; consider replacing it with a named constant [readability-magic-numbers] | |
/home/sgilliam/src/riftshadow/code/ap.c:1272:39: warning: pointer parameter 'demonptr' can be pointer to const [readability-non-const-parameter] | |
void demon_appear(CHAR_DATA *ch, int *demonptr, int *typeptr) | |
^ | |
const | |
/home/sgilliam/src/riftshadow/code/ap.c:1272:54: warning: pointer parameter 'typeptr' can be pointer to const [readability-non-const-parameter] | |
void demon_appear(CHAR_DATA *ch, int *demonptr, int *typeptr) | |
^ | |
const | |
/home/sgilliam/src/riftshadow/code/ap.c:1277:2: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] | |
int demon = *demonptr, type = *typeptr; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/home/sgilliam/src/riftshadow/code/ap.c:1278:13: warning: variable 'mob' is not initialized [cppcoreguidelines-init-variables] | |
CHAR_DATA *mob; | |
^ | |
= NULL | |
/home/sgilliam/src/riftshadow/code/ap.c:1340:17: warning: statement should be inside braces [google-readability-braces-around-statements] | |
if (vnum == -1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:1340:17: warning: statement should be inside braces [hicpp-braces-around-statements] | |
if (vnum == -1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:1340:17: warning: statement should be inside braces [readability-braces-around-statements] | |
if (vnum == -1) | |
^ | |
{ | |
/home/sgilliam/src/riftshadow/code/ap.c:1353:14: warning: 60 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] | |
af.level = 60; | |
^ | |
/home/sgilliam/src/riftshadow/code/ap.c:1353:14: warning: 60 is a magic number; consider replacing it with a named constant [readability-m |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment