[Pkg-wmaker-commits] [wmhdplop] 34/40: debian/patches: (fix_compiler_warnings.patch) Fix compiler warnings.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Mon Aug 17 11:10:13 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmhdplop.
commit b994d550121bcf33f95750cd4c2794b280615072
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date: Tue Oct 14 11:19:54 2014 -0500
debian/patches: (fix_compiler_warnings.patch) Fix compiler warnings.
---
debian/patches/fix_compiler_warnings.patch | 93 ++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 94 insertions(+)
diff --git a/debian/patches/fix_compiler_warnings.patch b/debian/patches/fix_compiler_warnings.patch
new file mode 100644
index 0000000..e31dd1d
--- /dev/null
+++ b/debian/patches/fix_compiler_warnings.patch
@@ -0,0 +1,93 @@
+Description: Fix compiler warnings.
+ In particular, the following:
+ .
+ wmhdplop.c:451:96: warning: operation on ‘dl->touched_w’ may be undefined
+ [-Wsequence-point]
+ .
+ wmhdplop.c:980:44: warning: ignoring return value of ‘seteuid’, declared with
+ attribute warn_unused_result [-Wunused-result]
+ .
+ procstat.c:73:19: warning: variable ‘in_our_disk’ set but not used
+ [-Wunused-but-set-variable]
+ .
+ dockapp_imlib2.c:311:85: warning: unused parameter ‘prefs’ [-Wunused-parameter]
+ .
+ gkrellm_hdplop.c:187:40: warning: unused parameter ‘widget’
+ [-Wunused-parameter]
+Author: Doug Torrance <dtorrance at monmouthcollege.edu>
+Last-Update: 2014-10-14
+
+--- a/wmhdplop.c
++++ b/wmhdplop.c
+@@ -448,7 +448,8 @@
+ imlib_image_fill_rectangle(lx+1,y-5,3,3);
+ }
+ if (dl->touched_w) {
+- imlib_context_set_color(255,100-10*dl->touched_w,100-10*dl->touched_w, 25*dl->touched_w--);
++ imlib_context_set_color(255,100-10*dl->touched_w,100-10*dl->touched_w, 25*dl->touched_w - 1);
++ dl->touched_w--;
+ imlib_image_fill_rectangle(lx+1,y-9,3,3);
+ }
+ x += 5;
+@@ -977,7 +978,12 @@
+ int hdplop_main(int width, int height, GdkDrawable *gkdrawable)
+ #endif
+ {
+- euid = geteuid(); uid = getuid(); seteuid(uid);
++ int s;
++
++ euid = geteuid(); uid = getuid();
++ s = seteuid(uid);
++ if (s == -1)
++ fprintf(stderr, "seteuid(uid) failed : %s\n", strerror(errno));
+ ALLOC_OBJ(app);
+ srand(time(NULL));
+ /* Initialize options */
+--- a/procstat.c
++++ b/procstat.c
+@@ -70,7 +70,7 @@
+ FILE *f;
+ char line[1024];
+ char hdname[200];
+- int readok = 0, in_our_disk = 0;
++ int readok = 0;
+ const char *proc_fname;
+ if (!use_proc_diskstats) proc_fname = "/proc/partitions";
+ else proc_fname = "/proc/diskstats";
+@@ -93,7 +93,6 @@
+ dl->touched_r = (dl->nr - nr) ? 10 : dl->touched_r;
+ dl->touched_w = (dl->nw - nw) ? 10 : dl->touched_w;
+ dl->nr = nr; dl->nw = nw;
+- if (!is_partition(major,minor)) in_our_disk = 1;
+ if (is_displayed(dl->hd_id,dl->part_id) &&
+ ((dl->part_id && (!find_id(dl->hd_id, 0) || !is_displayed(dl->hd_id, 0))) || /* partition without host disk */
+ (dl->part_id == 0))) /* disk */
+@@ -112,7 +111,7 @@
+ }
+ readok = 2;
+ }
+- } else if (!is_partition(major,minor)) in_our_disk = 0;
++ }
+ /* if (in_our_disk || find_dev(major,minor))*/ {
+ strlist *sl;
+ for (sl = swap_list(); sl; sl=sl->next) {
+--- a/dockapp_imlib2.c
++++ b/dockapp_imlib2.c
+@@ -319,6 +319,7 @@
+ #ifndef GKRELLM
+ dockimlib2_xinit(dock, prefs);
+ #else
++ (void) prefs;
+ dockimlib2_gkrellm_xinit(dock, gkdrawable);
+ #endif
+ dockimlib2_setup_imlib(dock);
+--- a/gkrellm_hdplop.c
++++ b/gkrellm_hdplop.c
+@@ -185,6 +185,7 @@
+ }
+
+ static void cb_reload_fonts(GtkWidget *widget) {
++ (void) widget;
+ if (strcmp(gtk_entry_get_text(GTK_ENTRY(entry_smallfont)), app->current_smallfont_name) ||
+ strcmp(gtk_entry_get_text(GTK_ENTRY(entry_bigfont)), app->current_bigfont_name)) {
+ ASSIGN_STRING(Prefs.smallfontname, gtk_entry_get_text(GTK_ENTRY(entry_smallfont)));
diff --git a/debian/patches/series b/debian/patches/series
index acce42a..2654569 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ fix-ftbfs-gcc-4.7-667415.patch
ldflags-to-ldadd.patch
find-disk-device.patch
modernize_autotools.patch
+fix_compiler_warnings.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmhdplop.git
More information about the Pkg-wmaker-commits
mailing list