The draw_fire function is defined as inline but with external linkage. I've attached a couple of patches intended to leave inlining to the discretion of the compiler by (a) removing the inline keyword (which fixes the FTBFS) and (b) changing the linkage of a number of functions to static.
J.
From 9761a5f7c1d8fdb73136c6446c3dff18e28751e1 Mon Sep 17 00:00:00 2001 From: Jeremy Sowden <jer...@azazel.net> Date: Sat, 22 Jun 2019 11:59:55 +0100 Subject: [PATCH 4/5] Added patch to remove inline from extern function (closes: #925858). --- ...ne-from-function-with-extern-linkage.patch | 29 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 30 insertions(+) create mode 100644 debian/patches/removed-inline-from-function-with-extern-linkage.patch diff --git a/debian/patches/removed-inline-from-function-with-extern-linkage.patch b/debian/patches/removed-inline-from-function-with-extern-linkage.patch new file mode 100644 index 000000000000..3d441dc3203b --- /dev/null +++ b/debian/patches/removed-inline-from-function-with-extern-linkage.patch @@ -0,0 +1,29 @@ +From 7f5b40d6ad8a8d56bc15c686d378ee9284c0d9cd Mon Sep 17 00:00:00 2001 +From: Jeremy Sowden <jer...@azazel.net> +Date: Sat, 22 Jun 2019 11:37:44 +0100 +Subject: [PATCH] Removed inline from function with extern linkage. + +--- + src/wmfire.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/src/wmfire.c ++++ b/src/wmfire.c +@@ -111,7 +111,7 @@ + void change_flame(int); + GdkCursor *setup_cursor(); + void burn_spot(int, int, int); +-inline void draw_fire(unsigned int); ++void draw_fire(unsigned int); + static void make_wmfire_dockapp(); + void read_config(int, char **); + void do_help(void); +@@ -504,7 +504,7 @@ + /* Draw fire */ + /******************************************/ + +-inline void ++void + draw_fire(unsigned int load) + { + int x, y, i, j; diff --git a/debian/patches/series b/debian/patches/series index 6635dcfcb024..c96a80b84c95 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -5,3 +5,4 @@ fix_manpage.patch gdk_updates.patch fix_-Wunused-result.patch freebsd_port.patch +removed-inline-from-function-with-extern-linkage.patch -- 2.20.1
From b9fc9b66a69b3c5be8fb9ddcd2be249b069e7107 Mon Sep 17 00:00:00 2001 From: Jeremy Sowden <jer...@azazel.net> Date: Sat, 22 Jun 2019 12:01:08 +0100 Subject: [PATCH 5/5] Added patch to change function linkage to static where possible. --- ...-linkage-of-many-functions-to-static.patch | 141 ++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 142 insertions(+) create mode 100644 debian/patches/change-linkage-of-many-functions-to-static.patch diff --git a/debian/patches/change-linkage-of-many-functions-to-static.patch b/debian/patches/change-linkage-of-many-functions-to-static.patch new file mode 100644 index 000000000000..f419bb7626f3 --- /dev/null +++ b/debian/patches/change-linkage-of-many-functions-to-static.patch @@ -0,0 +1,141 @@ +From 5571fe949bf0ec83e88202df30b9de54ab780500 Mon Sep 17 00:00:00 2001 +From: Jeremy Sowden <jer...@azazel.net> +Date: Sat, 22 Jun 2019 11:42:07 +0100 +Subject: [PATCH] Change linkage of many functions to static. + +--- + src/wmfire.c | 45 +++++++++++++++++++++++---------------------- + 1 file changed, 23 insertions(+), 22 deletions(-) + +--- a/src/wmfire.c ++++ b/src/wmfire.c +@@ -103,18 +103,18 @@ + /* Functions */ + /******************************************/ + +-int update_cpu(); +-int update_mem(); +-int update_net(); +-int update_file(); +-int change_cpu(int); +-void change_flame(int); +-GdkCursor *setup_cursor(); +-void burn_spot(int, int, int); +-void draw_fire(unsigned int); ++static int update_cpu(); ++static int update_mem(); ++static int update_net(); ++static int update_file(); ++static int change_cpu(int); ++static void change_flame(int); ++static GdkCursor *setup_cursor(); ++static void burn_spot(int, int, int); ++static void draw_fire(unsigned int); + static void make_wmfire_dockapp(); +-void read_config(int, char **); +-void do_help(void); ++static void read_config(int, char **); ++static void do_help(void); + + /******************************************/ + /* Globals */ +@@ -274,7 +274,7 @@ + /* Update cpu load statistics */ + /******************************************/ + +-int ++static int + update_cpu() + { + glibtop_cpu cpu; +@@ -315,7 +315,7 @@ + /* Update memory statistics */ + /******************************************/ + +-int ++static int + update_mem() + { + glibtop_mem mem; +@@ -356,7 +356,7 @@ + } + #endif + +-int ++static int + update_net() + { + int percent; +@@ -390,7 +390,7 @@ + /* Update file statistics */ + /******************************************/ + +-int ++static int + update_file() + { + char buf[128]; +@@ -417,7 +417,7 @@ + /* Change CPU monitor */ + /******************************************/ + +-int ++static int + change_cpu(int which) + { + glibtop_cpu cpu; +@@ -447,7 +447,7 @@ + /* Change flame effect */ + /******************************************/ + +-void ++static void + change_flame(int which) + { + if (which > 0 && which <= NFLAMES) +@@ -464,7 +464,7 @@ + /* Setup invisible cursor */ + /******************************************/ + +-GdkCursor * ++static GdkCursor * + setup_cursor() + { + GdkPixmap *source, *mask; +@@ -490,7 +490,8 @@ + /* Burn spot */ + /******************************************/ + +-void burn_spot(int x, int y, int c) ++static void ++burn_spot(int x, int y, int c) + { + int i; + +@@ -504,7 +505,7 @@ + /* Draw fire */ + /******************************************/ + +-void ++static void + draw_fire(unsigned int load) + { + int x, y, i, j; +@@ -662,7 +663,7 @@ + /* Read config file */ + /******************************************/ + +-void ++static void + read_config(int argc, char **argv) + { + int i, j; +@@ -762,7 +763,7 @@ + /* Help */ + /******************************************/ + +-void ++static void + do_help(void) + { + int i; diff --git a/debian/patches/series b/debian/patches/series index c96a80b84c95..3ada3207332d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -6,3 +6,4 @@ gdk_updates.patch fix_-Wunused-result.patch freebsd_port.patch removed-inline-from-function-with-extern-linkage.patch +change-linkage-of-many-functions-to-static.patch -- 2.20.1
signature.asc
Description: PGP signature