Test coverage - Almost all of score.c
[open-adventure.git] / common.h
index 59e87efaec77558f0b90c8eb4e36bed7d57bcc95..801bf365a5af24f97e8697595e3d83c5f1df6ca1 100644 (file)
--- a/common.h
+++ b/common.h
@@ -4,7 +4,6 @@
 
 #define LOCSIZ         185
 #define NOBJECTS       100
-#define HNTSIZ          20
 
 extern const char advent_to_ascii[128];
 extern const char ascii_to_advent[128];
@@ -21,7 +20,6 @@ enum bugtype {
    LOCATION_HAS_CONDITION_BIT_BEING_SET_TWICE,            // 8
    INVALID_SECTION_NUMBER_IN_DATABASE,                    // 9
    TOO_MANY_LOCATIONS,                                    // 10
-   TOO_MANY_CLASS_OR_TURN_MESSAGES,                       // 11
    SPECIAL_TRAVEL_500_GT_L_GT_300_EXCEEDS_GOTO_LIST = 20, // 20
    RAN_OFF_END_OF_VOCABULARY_TABLE,                       // 21
    VOCABULARY_TYPE_N_OVER_1000_NOT_BETWEEN_0_AND_3,       // 22
@@ -35,12 +33,8 @@ enum bugtype {
    ACTION_RETURNED_PHASE_CODE_BEYOND_END_OF_SWITCH,       // 100
 };
 
-static inline void bug(enum bugtype num, const char *error_string) __attribute__((__noreturn__));
-static inline void bug(enum bugtype num, const char *error_string)
-{
-   fprintf(stderr, "Fatal error %d, %s.\n", num, error_string);
-   exit(EXIT_FAILURE);
-}
+/* Alas, declaring this static confuses the coverage analyzer */
+void bug(enum bugtype, const char *) __attribute__((__noreturn__));
 
 #define BUG(x) bug(x, #x)