summaryrefslogtreecommitdiffstats
path: root/driver/demo-Gtk-conf.c
diff options
context:
space:
mode:
authorSimon Rettberg2021-04-06 14:43:39 +0200
committerSimon Rettberg2021-04-07 13:38:37 +0200
commit38886de0c3e9ea5729ef23e4c653fa2822f52e8f (patch)
tree9b799c8c968a92cc77746a95e0e8bdd90b6b13c3 /driver/demo-Gtk-conf.c
parentMaybe not remove, but ... (diff)
downloadxscreensaver-openslx.tar.gz
xscreensaver-openslx.tar.xz
xscreensaver-openslx.zip
xscreensaver 6.00v28r1openslx
Diffstat (limited to 'driver/demo-Gtk-conf.c')
-rw-r--r--driver/demo-Gtk-conf.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/driver/demo-Gtk-conf.c b/driver/demo-Gtk-conf.c
index bac6ecc..6d04215 100644
--- a/driver/demo-Gtk-conf.c
+++ b/driver/demo-Gtk-conf.c
@@ -1,5 +1,5 @@
/* demo-Gtk-conf.c --- implements the dynamic configuration dialogs.
- * xscreensaver, Copyright (c) 2001-2014 Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright (c) 2001-2020 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
@@ -59,8 +59,21 @@
# endif /* LIBXML_VERSION */
#endif /* xmlChildrenNode */
+#if (__GNUC__ >= 4) /* Ignore useless warnings generated by gtk.h */
+# undef inline
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wstrict-prototypes"
+# pragma GCC diagnostic ignored "-Wlong-long"
+# pragma GCC diagnostic ignored "-Wvariadic-macros"
+# pragma GCC diagnostic ignored "-Wpedantic"
+#endif
+
#include <gtk/gtk.h>
+#if (__GNUC__ >= 4)
+# pragma GCC diagnostic pop
+#endif
+
#include "demo-Gtk-conf.h"
/* Deal with deprecation of direct access to struct fields on the way to GTK3
@@ -1320,7 +1333,7 @@ parameters_to_cmd_line (GList *parms, gboolean default_p)
{
int L = g_list_length (parms);
int LL = 0;
- char **strs = (char **) calloc (sizeof (*parms), L);
+ char **strs = (char **) calloc (sizeof (*strs), L);
char *result;
char *out;
int i, j;
@@ -1428,7 +1441,7 @@ parse_command_line_into_parameters (const char *filename,
char *option = rest->data;
rest->data = 0;
- if (option[0] != '-' && option[0] != '+')
+ if (option && option[0] != '-' && option[0] != '+')
{
if (debug_p)
fprintf (stderr, "%s: WARNING: %s: not a switch: \"%s\"\n",
@@ -1737,7 +1750,8 @@ get_description (GList *parms, gboolean verbose_p)
s++;
else if (s[1] == ' ' || s[1] == '\t')
s++; /* next line is indented: leave newline */
- else if (!strncmp(s+1, "http:", 5))
+ else if (!strncmp(s+1, "http:", 5) ||
+ !strncmp(s+1, "https:", 5))
s++; /* next line begins a URL: leave newline */
else
s[0] = ' '; /* delete newline to un-fold this line */
@@ -1770,7 +1784,7 @@ get_description (GList *parms, gboolean verbose_p)
}
#if 0
- if (verbose_p)
+ /*if (verbose_p)*/
{
fprintf (stderr, "%s: text read is \"%s\"\n", blurb(),doc->string);
fprintf (stderr, "%s: description is \"%s\"\n", blurb(), d);