mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Remove warning on clang
This commit is contained in:
+2
-2
@@ -499,7 +499,7 @@ gb_internal Type *check_assignment_variable(CheckerContext *ctx, Operand *lhs, O
|
|||||||
ERROR_BLOCK();
|
ERROR_BLOCK();
|
||||||
error(lhs->expr, "Cannot assign to '%s'", str);
|
error(lhs->expr, "Cannot assign to '%s'", str);
|
||||||
|
|
||||||
if (e) if (e->flags & EntityFlag_ForValue) {
|
if (e && e->flags & EntityFlag_ForValue) {
|
||||||
isize offset = show_error_on_line(e->token.pos, token_pos_end(e->token), "Suggestion:");
|
isize offset = show_error_on_line(e->token.pos, token_pos_end(e->token), "Suggestion:");
|
||||||
if (offset < 0) {
|
if (offset < 0) {
|
||||||
if (is_type_map(e->type)) {
|
if (is_type_map(e->type)) {
|
||||||
@@ -515,7 +515,7 @@ gb_internal Type *check_assignment_variable(CheckerContext *ctx, Operand *lhs, O
|
|||||||
error_line("'%.*s' is immutable, declare it as '&%.*s' to make it mutable\n", LIT(e->token.string), LIT(e->token.string));
|
error_line("'%.*s' is immutable, declare it as '&%.*s' to make it mutable\n", LIT(e->token.string), LIT(e->token.string));
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (e->flags & EntityFlag_SwitchValue) {
|
} else if (e && e->flags & EntityFlag_SwitchValue) {
|
||||||
isize offset = show_error_on_line(e->token.pos, token_pos_end(e->token), "Suggestion:");
|
isize offset = show_error_on_line(e->token.pos, token_pos_end(e->token), "Suggestion:");
|
||||||
if (offset < 0) {
|
if (offset < 0) {
|
||||||
error_line("\tSuggestion: Did you mean? 'switch &%.*s in ...'\n", LIT(e->token.string));
|
error_line("\tSuggestion: Did you mean? 'switch &%.*s in ...'\n", LIT(e->token.string));
|
||||||
|
|||||||
Reference in New Issue
Block a user