I only recently ra into this issue when trying to upload to the Arduino Uno Rev 2.
For any sketch, as soon as I get it to compile, I try to upload and I am met with the same issue:
avrdude: WARNING: invalid value for unused bits in fuse "fuse5", should be set to 1 according to datasheet
This behaviour is deprecated and will result in an error in future version
You probably want to use 0xcd instead of 0xc9 (double check with your datasheet first).
Board: Arduino Uno Wifi Rev2
Registers Emulation: ATMEGA328
Port: detects the right arduino
Programmer: Onboard Atmel mEDBG