diff --git a/include/rwmem.h b/include/rwmem.h index 926a470..5331b02 100644 --- a/include/rwmem.h +++ b/include/rwmem.h @@ -357,7 +357,7 @@ class IOReg: public RWMemoryMember { } protected: - unsigned char get() const { + unsigned char get() const override { if (getValueFuncPtr) return (p->*getValueFuncPtr)(); else if (tv) { @@ -365,7 +365,7 @@ class IOReg: public RWMemoryMember { } return 0; } - void set(unsigned char val) { + void set(unsigned char val) override { if (setValueFuncPtr) (p->*setValueFuncPtr)(val); else if (tv) { diff --git a/libsim/avrreadelf.cpp b/libsim/avrreadelf.cpp index 393b815..33e1f0f 100644 --- a/libsim/avrreadelf.cpp +++ b/libsim/avrreadelf.cpp @@ -26,6 +26,7 @@ #include <string> #include <map> #include <limits> +#include <cinttypes> #include "elfio/elfio.hpp" @@ -105,7 +106,7 @@ void ELFLoad(const AvrDevice * core) { } else if(value >= 0x840000 && value < 0x840400) { /* signature space starting from 0x840000, do nothing */; } else - avr_warning("Unknown symbol address range found! (symbol='%s', address=0x%lx)", + avr_warning("Unknown symbol address range found! (symbol='%s', address=0x%" PRIx64 ")", name.c_str(), value); @@ -148,7 +149,7 @@ void ELFLoad(const AvrDevice * core) { } else if(vma >= 0x840000 && vma < 0x840400) { // read and check signature, if available, space from 0x840000 to 0x840400 if(filesize != 3) - avr_error("wrong device signature size in elf file, expected=3, given=%lu", + avr_error("wrong device signature size in elf file, expected=3, given=%" PRIu64 "", filesize); else { unsigned int sig = (((data[2] << 8) + data[1]) << 8) + data[0]; @@ -190,7 +191,7 @@ unsigned int ELFGetSignature(const char *filename) { if(vma >= 0x840000 && vma < 0x840400) { // read and check signature, if available, space from 0x840000 to 0x840400 if(filesize != 3) - avr_error("wrong device signature size in elf file, expected=3, given=%lu", + avr_error("wrong device signature size in elf file, expected=3, given=%" PRIu64 "", filesize); else { const unsigned char* data = (const unsigned char*)pseg->get_data();