foxygit / doom Log in
commit ee9fc21fd6b7e50706fa093b9ccabd6dd56b02db
Author:     Fabian Greffrath <fabian@greffrath.com>
AuthorDate: Thu Sep 12 09:28:09 2019 +0200
Commit:     Fabian Greffrath <fabian@greffrath.com>
CommitDate: Thu Sep 12 09:28:09 2019 +0200

    midiproc: fix compiler warnings introduced by the previous bug fix
---
 midiproc/main.c  | 6 ++++--
 src/i_midipipe.c | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/midiproc/main.c b/midiproc/main.c
index 02ac930f..14140f13 100644
--- a/midiproc/main.c
+++ b/midiproc/main.c
@@ -393,6 +393,8 @@ void InitPipes(HANDLE in, HANDLE out)
 //
 int main(int argc, char *argv[])
 {
+    HANDLE in, out;
+
     // Make sure we're not launching this process by itself.
     if (argc < 5)
     {
@@ -431,13 +433,13 @@ int main(int argc, char *argv[])
     }

     // Parse out our handle ids.
-    HANDLE in = strtol(argv[3], NULL, 10);
+    in = (HANDLE) strtol(argv[3], NULL, 10);
     if (in == 0)
     {
         return EXIT_FAILURE;
     }

-    HANDLE out = strtol(argv[4], NULL, 10);
+    out = (HANDLE) strtol(argv[4], NULL, 10);
     if (out == 0)
     {
         return EXIT_FAILURE;
diff --git a/src/i_midipipe.c b/src/i_midipipe.c
index 08324002..6c5a7a92 100644
--- a/src/i_midipipe.c
+++ b/src/i_midipipe.c
@@ -472,7 +472,7 @@ boolean I_MidiPipe_InitServer()
     // Define the command line.  Version, Sample Rate, and handles follow
     // the executable name.
     M_snprintf(params_buf, sizeof(params_buf), "%d %Iu %Iu",
-        snd_samplerate, midi_process_in_reader, midi_process_out_writer);
+        snd_samplerate, (size_t) midi_process_in_reader, (size_t) midi_process_out_writer);
     cmdline = M_StringJoin(module, " \"" PACKAGE_STRING "\"", " ", params_buf, NULL);

     // Launch the subprocess