diff options
| author | Nakst <djnakst2@gmail.com> | 2018-03-10 20:29:43 +0000 |
|---|---|---|
| committer | Nakst <djnakst2@gmail.com> | 2018-03-10 20:29:43 +0000 |
| commit | 9fa4aa40b79b2ed37cfd70e2281de1879e5113cb (patch) | |
| tree | 1e64ada9c13cc79ea4d3f318d867d2270642a7e9 | |
| parent | 52f60c706aa41ec068698599adefa9189f4a02e3 (diff) | |
fix compile warnings on linux
| -rw-r--r-- | src/checker.cpp | 11 | ||||
| -rw-r--r-- | src/main.cpp | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/checker.cpp b/src/checker.cpp index 9d99b3a77..5d4557765 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -1602,11 +1602,12 @@ void check_decl_attributes(Checker *c, Array<AstNode *> attributes, DeclAttribut if (value != nullptr) { Operand op = {}; check_expr(c, &op, value); - if (op.mode ) - if (op.mode != Addressing_Constant) { - error(value, "An attribute element must be constant"); - } else { - ev = op.value; + if (op.mode) { + if (op.mode != Addressing_Constant) { + error(value, "An attribute element must be constant"); + } else { + ev = op.value; + } } } diff --git a/src/main.cpp b/src/main.cpp index 0a2b0723d..65597dfc5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -395,7 +395,7 @@ bool parse_build_flags(Array<String> args) { path = string_trim_whitespace(path); if (is_import_path_valid(path)) { if(!string_ends_with(path, str_lit(".rc"))) { - gb_printf_err("Invalid -resource path, missing .rc\n", LIT(path)); + gb_printf_err("Invalid -resource path %.*s, missing .rc\n", LIT(path)); bad_flags = true; break; } |