Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mac warnings #1

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/rwmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,15 +357,15 @@ class IOReg: public RWMemoryMember {
}

protected:
unsigned char get() const {
unsigned char get() const override {
if (getValueFuncPtr)
return (p->*getValueFuncPtr)();
else if (tv) {
avr_warning("Reading of '%s' is not supported.", tv->name().c_str());
}
return 0;
}
void set(unsigned char val) {
void set(unsigned char val) override {
if (setValueFuncPtr)
(p->*setValueFuncPtr)(val);
else if (tv) {
Expand Down
7 changes: 4 additions & 3 deletions libsim/avrreadelf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <string>
#include <map>
#include <limits>
#include <cinttypes>

#include "elfio/elfio.hpp"

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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();
Expand Down