From e1f2c600d1dee9a0fb569c1a7286a406aec36591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Alexander=20Tremblay?= <104087368+PlutoTramble@users.noreply.github.com> Date: Wed, 8 Mar 2023 22:35:08 -0500 Subject: [PATCH] Fixed type error when compiling for arm (#1122) * Fixed type error when compiling * Replaced 'atoi(fb) == -1' to 'fb == (char*)-1' --- src/raspberrypi/devices/scsi_powerview.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/raspberrypi/devices/scsi_powerview.cpp b/src/raspberrypi/devices/scsi_powerview.cpp index cf3ca4da..43598163 100644 --- a/src/raspberrypi/devices/scsi_powerview.cpp +++ b/src/raspberrypi/devices/scsi_powerview.cpp @@ -401,7 +401,7 @@ bool SCSIPowerView::Init(const map& params) fblinelen = fbfixinfo.line_length; fb = (char *)mmap(0, fbfixinfo.smem_len, PROT_READ | PROT_WRITE, MAP_SHARED, fbfd, 0); - if ((int)fb == -1){ + if (fb == (char*)-1){ LOGERROR("Unable to mmap the framebuffer memory. Are you running as root?"); return false; } @@ -488,7 +488,7 @@ bool SCSIPowerView::WriteUnknownCC(const DWORD *cdb, const BYTE *buf, const DWOR { if(length > sizeof(unknown_cc_data)){ - LOGERROR("%s Received Unknown CC data that is larger (%d bytes) than allocated size (%d bytes)", __PRETTY_FUNCTION__, length, sizeof(unknown_cc_data)); + LOGERROR("%s Received Unknown CC data that is larger (%d bytes) than allocated size (%d bytes)", __PRETTY_FUNCTION__, length, (int)sizeof(unknown_cc_data)); return false; } @@ -508,7 +508,7 @@ bool SCSIPowerView::WriteColorPalette(const DWORD *cdb, const BYTE *buf, const D return true; } if(length > sizeof(color_palette)){ - LOGERROR("%s Received Color Palette that is larger (%d bytes) than allocated size (%d bytes)", __PRETTY_FUNCTION__, length, sizeof(color_palette)); + LOGERROR("%s Received Color Palette that is larger (%d bytes) than allocated size (%d bytes)", __PRETTY_FUNCTION__, length, (int)sizeof(color_palette)); return false; }