Fixed type error when compiling for arm (#1122)

* Fixed type error when compiling

* Replaced 'atoi(fb) == -1' to 'fb == (char*)-1'
This commit is contained in:
Cédric Alexander Tremblay 2023-03-08 22:35:08 -05:00 committed by GitHub
parent 5fb1dbcdb6
commit e1f2c600d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -401,7 +401,7 @@ bool SCSIPowerView::Init(const map<string, string>& 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;
}