summarylogtreecommitdiffstats
path: root/0023-rx-Add-static-attribute-to-internal-functions.patch
blob: 7145f3be39f88daa8b7c988423d5d95aacc2a19e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
From 4c92936aefede187e57a9a433c0c192af2fc5e84 Mon Sep 17 00:00:00 2001
From: Cheyenne Wills <cwills@sinenomine.net>
Date: Fri, 12 Jan 2024 15:30:23 -0700
Subject: [PATCH 23/32] rx: Add static attribute to internal functions

When building against a Linux 6.8 kernel, functions that are missing
prototypes or declarations are flagged.

We can add the static attribute to functions that are not referenced
outside of the file that implements them to avoid having these functions
flagged by the compiler.

These functions are flagged due to missing prototypes when building
against a Linux 6.8 kernel (which sets the -Wmissing-declarations and
-Wmissing-prototypes compiler flags as default). Linux 6.8 commit:
 'Makefile.extrawarn: turn on missing-prototypes globally' (0fcb70851f).

When building against a kernel with CONFIG_WERROR=y, the build fails.

There are no functional changes in this commit.

Reviewed-on: https://gerrit.openafs.org/15626
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 55adceba2d561ec4e89235de329782a68e603a11)

Change-Id: I1b2a6e1c07bd4b75b7b83e177f17865eb903e488
Reviewed-on: https://gerrit.openafs.org/15701
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
---
 src/rx/rx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/rx/rx.c b/src/rx/rx.c
index aaec60907..d6c52c369 100644
--- a/src/rx/rx.c
+++ b/src/rx/rx.c
@@ -6513,7 +6513,7 @@ mtuout:
     return -1;
 }
 
-void
+static void
 rxi_NatKeepAliveEvent(struct rxevent *event, void *arg1,
 		      void *dummy, int dummy2)
 {
@@ -6615,7 +6615,7 @@ rx_SetConnSecondsUntilNatPing(struct rx_connection *conn, afs_int32 seconds)
  * declared dead; if nothing has been sent for a while, we send a
  * keep-alive packet (if we're actually trying to keep the call alive)
  */
-void
+static void
 rxi_KeepAliveEvent(struct rxevent *event, void *arg1, void *dummy,
 		   int dummy2)
 {
@@ -6656,7 +6656,7 @@ rxi_KeepAliveEvent(struct rxevent *event, void *arg1, void *dummy,
 }
 
 /* Does what's on the nameplate. */
-void
+static void
 rxi_GrowMTUEvent(struct rxevent *event, void *arg1, void *dummy, int dummy2)
 {
     struct rx_call *call = arg1;
@@ -8266,7 +8266,7 @@ static int rxi_monitor_processStats = 0;
 static int rxi_monitor_peerStats = 0;
 
 
-void
+static void
 rxi_ClearRPCOpStat(rx_function_entry_v1_p rpc_stat)
 {
     rpc_stat->invocations = 0;
-- 
2.45.1