From 3dc7e6d70edd0d3f41506a41ce7cc15a14f3618c Mon Sep 17 00:00:00 2001 From: zeromus Date: Sun, 17 Mar 2019 23:23:48 -0400 Subject: [PATCH] fix warnings from weird code --- desmume/src/frontend/windows/ramwatch.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/desmume/src/frontend/windows/ramwatch.cpp b/desmume/src/frontend/windows/ramwatch.cpp index 529127aaf..58745b9d4 100644 --- a/desmume/src/frontend/windows/ramwatch.cpp +++ b/desmume/src/frontend/windows/ramwatch.cpp @@ -435,8 +435,9 @@ void OpenRWRecentFile(int memwRFileNumber) do { fgets(Str_Tmp,1024,WatchFile); } while (Str_Tmp[0] == '\n'); - sscanf(Str_Tmp,"%*05X%*c%08X%*c%c%*c%c%*c%d",&(Temp.Address),&(Temp.Size),&(Temp.Type),&(Temp.WrongEndian)); - Temp.WrongEndian = 0; + int wrongEndian; + sscanf(Str_Tmp,"%*05X%*c%08X%*c%c%*c%c%*c%d",&Temp.Address,&Temp.Size,&Temp.Type,&wrongEndian); + Temp.WrongEndian = 0; //why??? char *Comment = strrchr(Str_Tmp,DELIM) + 1; *strrchr(Comment,'\n') = '\0'; InsertWatch(Temp,Comment); @@ -570,8 +571,9 @@ bool Load_Watches(bool clear, const char* filename) do { fgets(Str_Tmp,1024,WatchFile); } while (Str_Tmp[0] == '\n'); - sscanf(Str_Tmp,"%*05X%*c%08X%*c%c%*c%c%*c%d",&(Temp.Address),&(Temp.Size),&(Temp.Type),&(Temp.WrongEndian)); - Temp.WrongEndian = 0; + int wrongEndian; + sscanf(Str_Tmp,"%*05X%*c%08X%*c%c%*c%c%*c%d",&Temp.Address,&Temp.Size,&Temp.Type,&wrongEndian); + //Temp.WrongEndian = 0; //WHY? char *Comment = strrchr(Str_Tmp,DELIM) + 1; *strrchr(Comment,'\n') = '\0'; InsertWatch(Temp,Comment);