# fix compile error when building zig w/ clang · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/de2b0cd722ca8fe98d16c86825db4cb2a70931c6)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: de2b0cd722ca8fe98d16c86825db4cb2a70931c6

Requested commit: de2b0cd722ca8fe98d16c86825db4cb2a70931c6

Commit: de2b0cd722ca8fe98d16c86825db4cb2a70931c6

Tree: 04124d8ac7ac014635c3fa97bee3e765bc81cfe0

Author: Michael Dusan

Committer: Andrew Kelley

## Message

```
fix compile error when building zig w/ clang

errors as reported on macOS w/ Xcode 10.1, 10.2 and 11.0:

src/ir.cpp:23285:16: error: variable 'bits' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
    } else if (float_type->id == ZigTypeIdFloat)
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ir.cpp:23288:13: note: uninitialized use occurs here
    switch (bits) {
            ^~~~
src/ir.cpp:23285:12: note: remove the 'if' if its condition is always true
    } else if (float_type->id == ZigTypeIdFloat)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ir.cpp:23281:18: note: initialize the variable 'bits' to silence this warning
    unsigned bits;

```

## Parents

- [24400d5882aa2b83a4aed3e4c1503d0393e1c541](https://git.cafe/gitcafe/zig/commit/24400d5882aa2b83a4aed3e4c1503d0393e1c541?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/de2b0cd722ca8fe98d16c86825db4cb2a70931c6?format=markdown)
