diff options
author | Chris Robinson <[email protected]> | 2020-10-23 20:23:40 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-10-23 21:03:13 -0700 |
commit | 88b9eb1560f4971efc6d65aab5faecdf2f0a10e2 (patch) | |
tree | c7ffb95112ad8bca0c111c94e7940ab8dda3c461 | |
parent | 6de861a75c6eafc43d9d017282d7e53a320bcdbc (diff) |
Silence a couple more MSVC warnings
-rw-r--r-- | examples/alrecord.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/examples/alrecord.c b/examples/alrecord.c index 0e81eb76..03894493 100644 --- a/examples/alrecord.c +++ b/examples/alrecord.c @@ -56,14 +56,19 @@ static float msvc_strtof(const char *str, char **end) static void fwrite16le(ALushort val, FILE *f) { - ALubyte data[2] = { (ALubyte)(val&0xff), (ALubyte)((val>>8)&0xff) }; + ALubyte data[2]; + data[0] = (ALubyte)(val&0xff); + data[1] = (ALubyte)(val>>8); fwrite(data, 1, 2, f); } static void fwrite32le(ALuint val, FILE *f) { - ALubyte data[4] = { (ALubyte)(val&0xff), (ALubyte)((val>>8)&0xff), (ALubyte)((val>>16)&0xff), - (ALubyte)((val>>24)&0xff) }; + ALubyte data[4]; + data[0] = (ALubyte)(val&0xff); + data[1] = (ALubyte)((val>>8)&0xff); + data[2] = (ALubyte)((val>>16)&0xff); + data[3] = (ALubyte)(val>>24); fwrite(data, 1, 4, f); } |