diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-01-15 14:29:02 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-01-15 14:29:02 -0700 |
| commit | 8409e518abad78cef8984b798c404bdc2923efbf (patch) | |
| tree | 074da61b99da490f944d86a063c464598fa436b2 /src/analyze.cpp | |
| parent | 18374ea8f18b6b48c53e6e7bd23d536ac2e8a807 (diff) | |
| download | zig-8409e518abad78cef8984b798c404bdc2923efbf.tar.gz zig-8409e518abad78cef8984b798c404bdc2923efbf.zip | |
fix build with gcc
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index 9cf10d7c41..508a234da1 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -1308,7 +1308,7 @@ static TypeTableEntry *analyze_enum_value_expr(CodeGen *g, ImportTableEntry *imp static TypeStructField *find_struct_type_field(TypeTableEntry *type_entry, Buf *name, int *index) { assert(type_entry->id == TypeTableEntryIdStruct); - for (int i = 0; i < type_entry->data.structure.field_count; i += 1) { + for (uint32_t i = 0; i < type_entry->data.structure.field_count; i += 1) { TypeStructField *field = &type_entry->data.structure.fields[i]; if (buf_eql_buf(field->name, name)) { *index = i; @@ -2839,6 +2839,7 @@ static TypeTableEntry *analyze_prefix_op_expr(CodeGen *g, ImportTableEntry *impo } } } + zig_unreachable(); } static TypeTableEntry * analyze_expression(CodeGen *g, ImportTableEntry *import, BlockContext *context, |
