diff --git a/s/cppcheck b/s/cppcheck new file mode 100755 index 000000000..441faaa65 --- /dev/null +++ b/s/cppcheck @@ -0,0 +1,3 @@ +#!/bin/sh +cppcheck -U_MSC_VER --enable=all -IcJSON -Isrc -Iclibs -Istorage src + diff --git a/src/kernel/save.c b/src/kernel/save.c index 4408ab909..4317417cc 100644 --- a/src/kernel/save.c +++ b/src/kernel/save.c @@ -1015,7 +1015,7 @@ faction *read_faction(gamedata * data) READ_STR(data->store, name, sizeof(name)); if (check_email(name) == 0) { faction_setemail(f, name); - } else { + } else if (name[0]) { log_warning("Invalid email address for faction %s: %s", itoa36(f->no), name); faction_setemail(f, NULL); } diff --git a/src/spells/unitcurse.c b/src/spells/unitcurse.c index 9289bb3c6..6fc979e38 100644 --- a/src/spells/unitcurse.c +++ b/src/spells/unitcurse.c @@ -345,16 +345,9 @@ const struct curse_type ct_skillmod = { NULL, read_skill, write_skill }; -const struct curse_type ct_fleechance = { - "fleechance", - CURSETYP_NORM, 0, (M_DURATION | M_VIGOUR), - NULL, NULL, NULL, NULL, NULL -}; - /* ------------------------------------------------------------- */ void register_unitcurse(void) { - ct_register(&ct_fleechance); ct_register(&ct_auraboost); ct_register(&ct_magicboost); ct_register(&ct_slavery); diff --git a/src/spells/unitcurse.h b/src/spells/unitcurse.h index 0da3ff8ff..681fa32de 100644 --- a/src/spells/unitcurse.h +++ b/src/spells/unitcurse.h @@ -23,7 +23,6 @@ extern "C" { struct curse_type; struct message; - extern const struct curse_type ct_fleechance; extern const struct curse_type ct_slavery; extern const struct curse_type ct_calmmonster; extern const struct curse_type ct_speed;