Skip to content

Commit

Permalink
wildmidi.c, wav output code: fix "W007: '&array' may not produce inte…
Browse files Browse the repository at this point in the history
…nded result" Watcom warnings.
  • Loading branch information
sezero committed Sep 18, 2017
1 parent e74b514 commit 53337c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/wildmidi.c
Expand Up @@ -458,7 +458,7 @@ static int open_wav_output(void) {
wav_hdr[31] = (bytes_per_sec >> 24) & 0xFF;
}

if (wmidi_write(audio_fd, &wav_hdr, 44) < 0) {
if (wmidi_write(audio_fd, wav_hdr, 44) < 0) {
fprintf(stderr, "ERROR: failed writing wav header (%s)\r\n", strerror(wmidi_geterrno()));
wmidi_close(audio_fd);
audio_fd = WM_BADF;
Expand Down Expand Up @@ -504,7 +504,7 @@ static void close_wav_output(void) {
wav_count[2] = (wav_size >> 16) & 0xFF;
wav_count[3] = (wav_size >> 24) & 0xFF;
wmidi_seekset(audio_fd, 40);
if (wmidi_write(audio_fd, &wav_count, 4) < 0) {
if (wmidi_write(audio_fd, wav_count, 4) < 0) {
fprintf(stderr, "\nERROR: failed writing wav (%s)\r\n", strerror(wmidi_geterrno()));
goto end;
}
Expand All @@ -515,7 +515,7 @@ static void close_wav_output(void) {
wav_count[2] = (wav_size >> 16) & 0xFF;
wav_count[3] = (wav_size >> 24) & 0xFF;
wmidi_seekset(audio_fd, 4);
if (wmidi_write(audio_fd, &wav_count, 4) < 0) {
if (wmidi_write(audio_fd, wav_count, 4) < 0) {
fprintf(stderr, "\nERROR: failed writing wav (%s)\r\n", strerror(wmidi_geterrno()));
goto end;
}
Expand Down

0 comments on commit 53337c3

Please sign in to comment.