From 18a36f8627f0f3ed80d34e5a4171ee773d679028 Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Thu, 11 May 2017 17:55:13 +0200 Subject: [PATCH] Split variable to prevent warnings on the ESP8266 platform See: https://travis-ci.org/felis/USB_Host_Shield_2.0/jobs/230952435#L1149 --- examples/USBH_MIDI/USBH_MIDI_dump/USBH_MIDI_dump.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/USBH_MIDI/USBH_MIDI_dump/USBH_MIDI_dump.ino b/examples/USBH_MIDI/USBH_MIDI_dump/USBH_MIDI_dump.ino index 397acdcb..5706b992 100644 --- a/examples/USBH_MIDI/USBH_MIDI_dump/USBH_MIDI_dump.ino +++ b/examples/USBH_MIDI/USBH_MIDI_dump/USBH_MIDI_dump.ino @@ -69,7 +69,8 @@ void MIDI_poll() pid = Midi.pid; } if (Midi.RecvData( &rcvd, bufMidi) == 0 ) { - sprintf(buf, "%08lX: ", (uint32_t)millis()); + uint32_t time = (uint32_t)millis(); + sprintf(buf, "%04X%04X: ", (uint16_t)(time >> 16), (uint16_t)(time & 0xFFFF)); // Split variable to prevent warnings on the ESP8266 platform Serial.print(buf); Serial.print(rcvd); Serial.print(':');