SHA256
1
0
forked from pool/openafs
openafs/d8b56f21994ce66d8daebb7d69e792f34c1a19ed
Christof Hanke d7141e7dbb - update to latest git branch stable-1_8_x
- change version to openafs-1.8.12-g... since the new stable release is 1.8.12
- apply intermediate patches for kernel 6.10
  * 03b280649f5e22ed74c217d7c98c3416a2fa9052: Linux-6.10: remove includes for asm/ia32_unistd.h
  * 0f6a3a402f4a66114da9231032bd68cdc4dee7bc: Linux-6.10: Use filemap_alloc_folio when avail
  * 658942f2791fad5e33ec7542158c16dfc66eed39: Linux-6.10: define a wrapper for vmalloc
  * d8b56f21994ce66d8daebb7d69e792f34c1a19ed: afs: avoid empty-body warning
  * 7097eec17bc01bcfc12c4d299136b2d3b94ec3d7: Linux 6.10: Move 'inline' before func return type

OBS-URL: https://build.opensuse.org/package/show/filesystems/openafs?expand=0&rev=127
2024-08-14 09:50:41 +00:00

77 lines
2.4 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

commit d8b56f21994ce66d8daebb7d69e792f34c1a19ed
Author: Cheyenne Wills <cwills@sinenomine.net>
Date: Wed Jun 12 14:24:01 2024 -0600
afs: avoid empty-body warning
With Linux 6.10 commit:
"kbuild: turn on -Wextra by default" (f5982cceb3)
there are additional compiler warnings that can turn
into build errors when --enable-checking is used.
"error: suggest braces around empty body in an if
statement [-Werror=empty-body]"
when there is an empty body, e.g.
if (foo)
;
Most cases are due to the macros afs_PutCell and afs_PutServer which are
"empty" macros.
Update the afs_PutCell and afs_PutServer macros so they expand to
do {} while(0)
Add a comment at the definitions for afs_PutCell and afs_PutServer to
document the reason for keeping them.
Add braces to conditionals that have an empty body.
There are no functional changes with this commit.
Change-Id: I359723eb6a19d1c78449902b4f477da131b0fa18
Reviewed-on: https://gerrit.openafs.org/15766
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
diff --git a/src/afs/afs.h b/src/afs/afs.h
index 4bde047e8..621a8a517 100644
--- a/src/afs/afs.h
+++ b/src/afs/afs.h
@@ -349,7 +349,8 @@ struct cell_alias {
char *cell;
};
-#define afs_PutCell(cellp, locktype)
+/* In case someday a counterpart for afs_GetCell is needed */
+#define afs_PutCell(cellp, locktype) do {} while(0)
/* the unixuser flag bit definitions */
#define UHasTokens 1 /* are the st and ct fields valid (ever set)? */
@@ -537,7 +538,8 @@ struct server {
afs_int32 capabilities;
};
-#define afs_PutServer(servp, locktype)
+/* In case someday a counterpart for afs_GetServer is needed */
+#define afs_PutServer(servp, locktype) do {} while(0)
/* structs for some pioctls - these are (or should be)
* also in venus.h
diff --git a/src/afs/afs_cbqueue.c b/src/afs/afs_cbqueue.c
index 2dd633588..11e3aa3f1 100644
--- a/src/afs/afs_cbqueue.c
+++ b/src/afs/afs_cbqueue.c
@@ -139,7 +139,9 @@ afs_DequeueCallback(struct vcache *avc)
debugvc = avc;
if (avc->callsort.prev) {
QRemove(&(avc->callsort));
- } else; /* must have got dequeued in a race */
+ } else {
+ /* must have got dequeued in a race */
+ }
return;
} /* afs_DequeueCallback */