summaryrefslogtreecommitdiff
path: root/unsorted
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2023-01-11 23:26:04 +0000
committerAsh Wolf <ninji@wuffs.org>2023-01-11 23:26:04 +0000
commit54bb1363a26b6a52cf1a8ecf1f16f76e9920956f (patch)
tree53644f3d0a9b24a10275ba723f6e7e43aee00ec9 /unsorted
parent0bec4f557a96e1a40437cf5af20cc78a5eec8a63 (diff)
downloadMWCC-54bb1363a26b6a52cf1a8ecf1f16f76e9920956f.tar.gz
MWCC-54bb1363a26b6a52cf1a8ecf1f16f76e9920956f.zip
get it to compile with clang
Diffstat (limited to 'unsorted')
-rw-r--r--unsorted/Arguments.c3
-rw-r--r--unsorted/Option.c6
-rw-r--r--unsorted/Parameter.c3
-rw-r--r--unsorted/ParserHelpers-cc.c6
-rw-r--r--unsorted/Targets.c3
5 files changed, 7 insertions, 14 deletions
diff --git a/unsorted/Arguments.c b/unsorted/Arguments.c
index 663d211..631f282 100644
--- a/unsorted/Arguments.c
+++ b/unsorted/Arguments.c
@@ -557,8 +557,7 @@ void Arg_AddToToolArgs(anon0_50 *ta, short tokval, char *toktxt) {
Arg_GrowArg(ta, ",");
break;
default:
-#line 787
- CLPFatalError(__FILE__, __LINE__, "Unknown token (%d)", tokval);
+ CLPFatalError(__FILE__, 787, "Unknown token (%d)", tokval);
break;
}
}
diff --git a/unsorted/Option.c b/unsorted/Option.c
index c1c8e91..e4851dc 100644
--- a/unsorted/Option.c
+++ b/unsorted/Option.c
@@ -81,8 +81,7 @@ int Args_StackSize(void) {
}
void Args_Push(short flags, void *first, void *second) {
-#line 104
- OPTION_ASSERT(oStackPtr<MAXSTACK);
+ OS_ASSERT(104, oStackPtr<MAXSTACK);
if (oStackPtr > 0)
{
short prev =
@@ -943,8 +942,7 @@ static int Options_DoParse(OptionList *search, int flags) {
tok = Arg_GetToken();
if (!tok)
tok = Arg_UndoToken();
-#line 1335
- OPTION_ASSERT(tok);
+ OS_ASSERT(1335, tok);
}
if (!parsedany || haderrors)
diff --git a/unsorted/Parameter.c b/unsorted/Parameter.c
index 03e4a75..31669e1 100644
--- a/unsorted/Parameter.c
+++ b/unsorted/Parameter.c
@@ -1012,8 +1012,7 @@ static int Param_GetArgument(PARAM_T *param, const char **cparam, int exec) {
lastOpt = !subparse ? ATK_END : ATK_ARG_END;
tok = Arg_PeekToken();
-#line 1467
- OPTION_ASSERT(tok);
+ OS_ASSERT(1467, tok);
if ((param->flags & PARAMFLAGS_3) == 0) {
if (tok->val == nextParam || tok->val == ATK_EQUALS)
diff --git a/unsorted/ParserHelpers-cc.c b/unsorted/ParserHelpers-cc.c
index fe081ad..07315b3 100644
--- a/unsorted/ParserHelpers-cc.c
+++ b/unsorted/ParserHelpers-cc.c
@@ -140,16 +140,14 @@ int SetupPragmas(const Pragma *pragmas) {
else if (*((char *)pragmas->value) == PR_RESET)
set = "reset";
else
-#line 186
- OPTION_ASSERT(*((char *)pragmas->value) == PR_UNSET);
+ OS_ASSERT(186, *((char *)pragmas->value) == PR_UNSET);
if (set) {
snprintf(tmp, sizeof(tmp), "#pragma %s %s\n", pragmas->pragma, set);
AddStringToHandle(&definesHandle, tmp);
}
} else {
-#line 195
- OPTION_ASSERT(!"Can't handle pragma");
+ OS_ASSERT(195, !"Can't handle pragma");
}
pragmas++;
}
diff --git a/unsorted/Targets.c b/unsorted/Targets.c
index 1c00170..378b9d7 100644
--- a/unsorted/Targets.c
+++ b/unsorted/Targets.c
@@ -5,8 +5,7 @@ ParserTool *pTool;
int SetParserToolInfo(ParserTool *tool) {
pTool = tool;
-#line 16
- OPTION_ASSERT(pTool->toolInfo && (parseopts.toolVersion || pTool->copyright));
+ OS_ASSERT(16, pTool->toolInfo && (parseopts.toolVersion || pTool->copyright));
return 1;
}