From: Ryan C. Gordon Date: Fri, 14 May 2010 04:26:43 +0000 (-0400) Subject: Fixed some strrchr compiler warnings. X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=a041e0c6375bd5f86d77f88f400b933d764b033e;p=lugaru.git Fixed some strrchr compiler warnings. --- diff --git a/Source/OpenGL_Windows.cpp b/Source/OpenGL_Windows.cpp index 9374b1f..89e665b 100644 --- a/Source/OpenGL_Windows.cpp +++ b/Source/OpenGL_Windows.cpp @@ -1314,12 +1314,12 @@ char *calcBaseDir(const char *argv0) char *retval; char *envr; - char *ptr = strrchr((char *)argv0, '/'); + const char *ptr = strrchr((char *)argv0, '/'); if (strchr(argv0, '/')) { retval = strdup(argv0); if (retval) - *(strrchr(retval, '/')) = '\0'; + *((char *) strrchr(retval, '/')) = '\0'; return(retval); } @@ -1746,7 +1746,7 @@ int main(int argc, char **argv) #if !USE_DEVIL static bool load_image(const char *file_name, TGAImageRec &tex) { - char *ptr = strrchr((char *)file_name, '.'); + const char *ptr = strrchr((char *)file_name, '.'); if (ptr) { if (strcasecmp(ptr+1, "png") == 0) @@ -1910,7 +1910,7 @@ png_done: static bool save_image(const char *file_name) { - char *ptr = strrchr((char *)file_name, '.'); + const char *ptr = strrchr((char *)file_name, '.'); if (ptr) { if (strcasecmp(ptr+1, "png") == 0)