summaryrefslogtreecommitdiffstats
path: root/driver/xscreensaver-getimage.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver/xscreensaver-getimage.c')
-rw-r--r--driver/xscreensaver-getimage.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/driver/xscreensaver-getimage.c b/driver/xscreensaver-getimage.c
index 092540d..1009cb7 100644
--- a/driver/xscreensaver-getimage.c
+++ b/driver/xscreensaver-getimage.c
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 2001-2018 by Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 2001-2020 by Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -52,11 +52,24 @@
#ifdef HAVE_GDK_PIXBUF
# undef HAVE_JPEGLIB
+
+# if (__GNUC__ >= 4) /* Ignore useless warnings generated by GTK headers */
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wlong-long"
+# pragma GCC diagnostic ignored "-Wvariadic-macros"
+# pragma GCC diagnostic ignored "-Wpedantic"
+# endif
+
# ifdef HAVE_GTK2
# include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
# else /* !HAVE_GTK2 */
# include <gdk-pixbuf/gdk-pixbuf-xlib.h>
# endif /* !HAVE_GTK2 */
+
+# if (__GNUC__ >= 4)
+# pragma GCC diagnostic pop
+# endif
+
#endif /* HAVE_GDK_PIXBUF */
#ifdef HAVE_JPEGLIB
@@ -766,6 +779,13 @@ maybe_read_ppm (Screen *screen, Visual *visual,
progname, filename);
goto FAIL;
}
+ else if (!strncasecmp (buf, "<?xml", 5))
+ {
+ fprintf (stderr, "%s: %s: sorry, SVG files not supported"
+ " when compiled with JPEGlib instead of GDK_Pixbuf.\n",
+ progname, filename);
+ goto FAIL;
+ }
if (strncmp (s, "P6", 2))
goto FAIL;