add parens around args in MIDI_EVENT macro
authorTom Hargreaves <hex@freezone.co.uk>
Sat, 6 Sep 2014 03:53:36 +0000 (04:53 +0100)
committerTom Hargreaves <hex@freezone.co.uk>
Sat, 6 Sep 2014 03:53:36 +0000 (04:53 +0100)
LUFA/Drivers/USB/Class/Common/MIDIClassCommon.h

index f52013c..b6f6034 100644 (file)
                 *
                 *  \return Constructed MIDI event ID.
                 */
                 *
                 *  \return Constructed MIDI event ID.
                 */
-               #define MIDI_EVENT(virtualcable, command)  ((virtualcable << 4) | (command >> 4))
+               #define MIDI_EVENT(virtualcable, command)  (((virtualcable) << 4) | ((command) >> 4))
 
        /* Enums: */
                /** Enum for the possible MIDI jack types in a MIDI device jack descriptor. */
 
        /* Enums: */
                /** Enum for the possible MIDI jack types in a MIDI device jack descriptor. */