[PATCH 5/5] Added patch to change function linkage to static where possible.
Jeremy Sowden
jeremy at azazel.net
Sat Jun 22 12:43:44 BST 2019
---
...-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 <jeremy at 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
More information about the Pkg-wmaker-devel
mailing list