PaulStoffregen / PS2Keyboard

PS/2 Keyboard Library for Arduino
http://www.pjrc.com/teensy/td_libs_PS2Keyboard.html
147 stars 57 forks source link

error: narrowing conversion #22

Closed himijendrix24 closed 5 years ago

himijendrix24 commented 5 years ago

Example files don't compile. Using Arduino IDE 1.8.6

C:\Users\Justus\Documents\Arduino\libraries\PS2Keyboard\PS2Keyboard.cpp:271:1: error: narrowing conversion of '-15708' from 'int' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]

 };

 ^
PaulStoffregen commented 5 years ago

Upgrade this library to the latest code. Upgrade to newer Arduino. In using a non-AVR board, also use the boards manager to update your board's support files.

This problem was fixed on Teensy and most Arduino boards quite some time ago. You simply have older software, before the fix.

himijendrix24 commented 5 years ago

Thanks, works. It's now a warning instead of an error.