opr: avoid empty nonnull argument index lists 76/13276/3
authorMichael Meffie <mmeffie@sinenomine.net>
Thu, 9 Aug 2018 19:18:50 +0000 (15:18 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 10 Aug 2018 12:42:19 +0000 (08:42 -0400)
Commit 71dc077831d339fc5822f2c2c79b65afe14b12f8 changed the AFS_NONULL
macro in opr.h to fix a build error on windows by adding an empty
argument index list.

However, Solaris compilers do not support empty parameter lists.
Specify the argument index to allow so nonnull function attributes can
be supported on Solaris.

Change-Id: I3e629868374eb6484923c253da2cdd1d8eacdb2f
Reviewed-on: https://gerrit.openafs.org/13276
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

src/opr/opr.h

index 1a47039..bf4b817 100644 (file)
@@ -70,8 +70,8 @@ extern void opr_AssertionFailed(const char *, int) AFS_NORETURN;
 
 extern char *opr_lcstring(char *d, const char *s, int n) AFS_NONNULL((1,2));
 extern char *opr_ucstring(char *d, const char *s, int n) AFS_NONNULL((1,2));
-extern void opr_stolower(char *s) AFS_NONNULL(());
-extern void opr_stoupper(char *s) AFS_NONNULL(());
+extern void opr_stolower(char *s) AFS_NONNULL((1));
+extern void opr_stoupper(char *s) AFS_NONNULL((1));
 extern char *opr_strcompose(char *buf, size_t len, ...) AFS_NONNULL((1));
 
 #endif