ref: cb0a882a311d94628b3197c1b9388203b25c92c5
parent: df2c0dc2f9a0d6a096080058e4460d18e52bd336
author: ISSOtm <eldredhabert0@gmail.com>
date: Mon Mar 23 12:03:36 EDT 2020
Order warnings alphabetically
--- a/include/asm/warning.h
+++ b/include/asm/warning.h
@@ -14,6 +14,7 @@
extern unsigned int nbErrors;
enum WarningID {
+ WARNING_ASSERT,
WARNING_BUILTIN_ARG,
WARNING_DIV,
WARNING_EMPTY_ENTRY,
@@ -21,10 +22,9 @@
WARNING_LONG_STR,
WARNING_OBSOLETE,
WARNING_SHIFT,
- WARNING_USER,
- WARNING_ASSERT,
WARNING_SHIFT_AMOUNT,
WARNING_TRUNCATION,
+ WARNING_USER,
NB_WARNINGS,
--- a/src/asm/warning.c
+++ b/src/asm/warning.c
@@ -28,6 +28,7 @@
};
static enum WarningState const defaultWarnings[NB_WARNINGS] = {
+ WARNING_ENABLED, /* Assertions */
WARNING_DISABLED, /* Invalid args to builtins */
WARNING_DISABLED, /* Division undefined behavior */
WARNING_DISABLED, /* Empty entry in `db`, `dw` or `dl` */
@@ -35,10 +36,9 @@
WARNING_DISABLED, /* String too long for internal buffers */
WARNING_DISABLED, /* Obsolete things */
WARNING_DISABLED, /* Shifting undefined behavior */
- WARNING_ENABLED, /* User warnings */
- WARNING_ENABLED, /* Assertions */
WARNING_DISABLED, /* Strange shift amount */
WARNING_ENABLED, /* Implicit truncation loses some bits */
+ WARNING_ENABLED, /* User warnings */
};
static enum WarningState warningStates[NB_WARNINGS];
@@ -65,6 +65,7 @@
}
static char const *warningFlags[NB_WARNINGS_ALL] = {
+ "assert",
"builtin-args",
"div",
"empty-entry",
@@ -72,10 +73,9 @@
"long-string",
"obsolete",
"shift",
- "user",
- "assert",
"shift-amount",
"truncation",
+ "user",
/* Meta warnings */
"all",
@@ -111,8 +111,9 @@
WARNING_LONG_STR,
WARNING_OBSOLETE,
WARNING_SHIFT,
- WARNING_USER,
WARNING_SHIFT_AMOUNT,
+ /* WARNING_TRUNCATION, */
+ /* WARNING_USER, */
META_WARNING_DONE
};