Skip to content

Commit

Permalink
Rix minor compile-time issues on the Pi
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Sep 5, 2023
1 parent 6d0bc3c commit 279a468
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions cpp/hal/gpiobus_raspberry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ bool GPIOBUS_Raspberry::Init(mode_e mode)
// Map peripheral region memory
void *map = mmap(NULL, 0x1000100, PROT_READ | PROT_WRITE, MAP_SHARED, fd, baseaddr);
if (map == MAP_FAILED) {
strerrno("Error: Unable to map memory");
spdlog::error("Error: Unable to map memory: "+ string(strerror(errno)));
close(fd);
return false;
}
Expand Down Expand Up @@ -183,7 +183,7 @@ bool GPIOBUS_Raspberry::Init(mode_e mode)
// GPIO chip open
fd = open("/dev/gpiochip0", 0);
if (fd == -1) {
spdlog::error("Unable to open /dev/gpiochip0. Is PiSCSI or RaSCSI already running?")
spdlog::error("Unable to open /dev/gpiochip0. Is PiSCSI or RaSCSI already running?");
return false;
}

Expand Down
16 changes: 8 additions & 8 deletions cpp/test/device_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,28 +133,28 @@ TEST(DeviceTest, ParseDeviceType)
TEST(DeviceTest, GetTypeString)
{
MockDevice schd(SCHD);
EXPECT_STREQ("SCHD", schd.GetTypeString());
EXPECT_EQ("SCHD", schd.GetTypeString());

MockDevice scrm(SCRM);
EXPECT_STREQ("SCRM", scrm.GetTypeString());
EXPECT_EQ("SCRM", scrm.GetTypeString());

MockDevice scmo(SCMO);
EXPECT_STREQ("SCMO", scmo.GetTypeString());
EXPECT_EQ("SCMO", scmo.GetTypeString());

MockDevice sccd(SCCD);
EXPECT_STREQ("SCCD", sccd.GetTypeString());
EXPECT_EQ("SCCD", sccd.GetTypeString());

MockDevice schs(SCHS);
EXPECT_STREQ("SCHS", schs.GetTypeString());
EXPECT_EQ("SCHS", schs.GetTypeString());

MockDevice scbr(SCBR);
EXPECT_STREQ("SCBR", scbr.GetTypeString());
EXPECT_EQ("SCBR", scbr.GetTypeString());

MockDevice scdp(SCDP);
EXPECT_STREQ("SCDP", scdp.GetTypeString());
EXPECT_EQ("SCDP", scdp.GetTypeString());

MockDevice sclp(SCLP);
EXPECT_STREQ("SCLP", sclp.GetTypeString());
EXPECT_EQ("SCLP", sclp.GetTypeString());
}

TEST(DeviceTest, Vendor)
Expand Down

0 comments on commit 279a468

Please sign in to comment.