This patch fixes a few warnings from gcc-4.x.x diff -pruN iv-2.2.1/include/string.h iv-2.2.1-gcc44/include/string.h --- iv-2.2.1/include/string.h 2007-07-30 07:42:17.000000000 +0000 +++ iv-2.2.1-gcc44/include/string.h 2011-03-17 13:25:44.000000000 +0000 @@ -43,9 +43,9 @@ extern int strlines(const char *s); #ifdef NEED_STRCASECMP extern int strcasecmp(const char *s1, const char *s2); #endif -#ifdef NEED_STRCASESTR -extern char *strcasestr(const char *haystack, const char *needle); -#endif +//#ifdef NEED_STRCASESTR +//extern const char *strcasestr(const char *haystack, const char *needle); +//#endif extern int strpfx(const char *s, const char *pfx); extern int strcasepfx(const char *s, const char *pfx); diff -pruN iv-2.2.1/iv/colorlevelsdlg.c iv-2.2.1-gcc44/iv/colorlevelsdlg.c --- iv-2.2.1/iv/colorlevelsdlg.c 2007-07-30 07:42:17.000000000 +0000 +++ iv-2.2.1-gcc44/iv/colorlevelsdlg.c 2011-03-17 13:34:55.000000000 +0000 @@ -1,4 +1,5 @@ #include +#include #include #include #include "guiutils.h" diff -pruN iv-2.2.1/iv/fb.c iv-2.2.1-gcc44/iv/fb.c --- iv-2.2.1/iv/fb.c 2007-07-30 07:42:17.000000000 +0000 +++ iv-2.2.1-gcc44/iv/fb.c 2011-03-17 13:42:16.000000000 +0000 @@ -1508,7 +1508,7 @@ static void FileBrowserDragDataGetCB( if(widget == fb->list_da) { gint buf_len; - gchar *buf = FileBrowserDNDBufFormat( + const guchar *buf = FileBrowserDNDBufFormat( fb->objects_list, fb->selection, &buf_len ); if(buf != NULL) @@ -1530,7 +1530,7 @@ static void FileBrowserDragDataGetCB( if(!data_sent) { /* Send a response indicating error */ - const gchar *s = "Error"; + const guchar *s = "Error"; gtk_selection_data_set( selection_data, GDK_SELECTION_TYPE_STRING, diff -pruN iv-2.2.1/iv/fullscreenimg.c iv-2.2.1-gcc44/iv/fullscreenimg.c --- iv-2.2.1/iv/fullscreenimg.c 2007-07-30 07:42:17.000000000 +0000 +++ iv-2.2.1-gcc44/iv/fullscreenimg.c 2011-03-17 13:59:14.000000000 +0000 @@ -1,3 +1,4 @@ +#include #include #include #include diff -pruN iv-2.2.1/iv/headerdlg.c iv-2.2.1-gcc44/iv/headerdlg.c --- iv-2.2.1/iv/headerdlg.c 2007-07-30 07:42:17.000000000 +0000 +++ iv-2.2.1-gcc44/iv/headerdlg.c 2011-03-17 14:02:00.000000000 +0000 @@ -1,4 +1,5 @@ #include +#include #include #include #include "guiutils.h" diff -pruN iv-2.2.1/iv/imgiojpeg.c iv-2.2.1-gcc44/iv/imgiojpeg.c --- iv-2.2.1/iv/imgiojpeg.c 2007-07-30 07:42:17.000000000 +0000 +++ iv-2.2.1-gcc44/iv/imgiojpeg.c 2011-03-17 14:02:55.000000000 +0000 @@ -7,9 +7,9 @@ #include "../include/fio.h" #include "imgio.h" -#if !defined(_WIN32) -#warning It is safe to ignore setjmp() and longjmp() warnings for this module -#endif +// #if !defined(_WIN32) +// #warning It is safe to ignore setjmp() and longjmp() warnings for this module +// #endif /* Last error message pointer */ diff -pruN iv-2.2.1/iv/imgiopng.c iv-2.2.1-gcc44/iv/imgiopng.c --- iv-2.2.1/iv/imgiopng.c 2007-07-30 07:42:17.000000000 +0000 +++ iv-2.2.1-gcc44/iv/imgiopng.c 2011-03-17 14:08:38.000000000 +0000 @@ -9,9 +9,9 @@ #endif #include "imgio.h" -#if !defined(_WIN32) -#warning It is safe to ignore setjmp() and longjmp() warnings for this module -#endif +// #if !defined(_WIN32) +// #warning It is safe to ignore setjmp() and longjmp() warnings for this module +// #endif /* Last error message pointer */ diff -pruN iv-2.2.1/iv/print_xprint_dlg.c iv-2.2.1-gcc44/iv/print_xprint_dlg.c --- iv-2.2.1/iv/print_xprint_dlg.c 2007-07-30 07:42:17.000000000 +0000 +++ iv-2.2.1-gcc44/iv/print_xprint_dlg.c 2011-03-17 14:05:19.000000000 +0000 @@ -1,6 +1,7 @@ #if !defined(_WIN32) && defined(HAVE_XPRINT) #include #include +#include #include #include diff -pruN iv-2.2.1/iv/rgba_to_cidx.c iv-2.2.1-gcc44/iv/rgba_to_cidx.c --- iv-2.2.1/iv/rgba_to_cidx.c 2007-07-30 07:42:17.000000000 +0000 +++ iv-2.2.1-gcc44/iv/rgba_to_cidx.c 2011-03-17 14:05:54.000000000 +0000 @@ -1,5 +1,6 @@ #include #include +#include #include #include "fsdither.h" #include "rgba_to_cidx.h" diff -pruN iv-2.2.1/iv/savedlg.c iv-2.2.1-gcc44/iv/savedlg.c --- iv-2.2.1/iv/savedlg.c 2007-07-30 07:42:17.000000000 +0000 +++ iv-2.2.1-gcc44/iv/savedlg.c 2011-03-17 14:06:41.000000000 +0000 @@ -1,4 +1,6 @@ #include +#include + #include #include diff -pruN iv-2.2.1/iv/string.cpp iv-2.2.1-gcc44/iv/string.cpp --- iv-2.2.1/iv/string.cpp 2007-07-30 07:42:17.000000000 +0000 +++ iv-2.2.1-gcc44/iv/string.cpp 2011-03-17 13:31:22.000000000 +0000 @@ -26,9 +26,9 @@ int strlines(const char *s); #ifdef NEED_STRCASECMP int strcasecmp(const char *s1, const char *s2); #endif -#ifdef NEED_STRCASESTR -char *strcasestr(const char *haystack, const char *needle); -#endif +//#ifdef NEED_STRCASESTR +//const char *strcasestr(const char *haystack, const char *needle); +//#endif int strpfx(const char *s, const char *pfx); int strcasepfx(const char *s, const char *pfx); @@ -221,7 +221,7 @@ int strcasecmp(const char *s1, const cha * Case insensitive version of strstr(). Returns the pointer to * needle in haystack if found or NULL on no match. */ -char *strcasestr(const char *haystack, const char *needle) +const char *strcasestr(const char *haystack, const char *needle) { const char *sh, *sn; @@ -1507,13 +1507,13 @@ int StringGetNetCommand(const char *str) * Returns the argument from str with spaces stripped. * This function never returns NULL. */ -char *StringGetNetArgument(const char *str) +char *StringGetNetArgument(char *str) { char *strptr; static char arg[CS_DATA_MAX_LEN]; if(str == NULL) - return(""); + return(NULL); strncpy(arg, str, CS_DATA_MAX_LEN); arg[CS_DATA_MAX_LEN - 1] = '\0'; @@ -1527,7 +1527,7 @@ char *StringGetNetArgument(const char *s return(strptr); } - return(""); + return(NULL); } @@ -1550,15 +1550,15 @@ char *StringCurrentTimeFormat(const char if(format == NULL) - return(""); + return(NULL); if((*format) == '\0') - return(""); + return(NULL); /* Get current time */ time(¤t); tm_ptr = localtime(¤t); if(tm_ptr == NULL) - return(""); + return(NULL); /* Format time string */ len = strftime(s, sizeof(s), format, tm_ptr);