]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libuuid: improve "restrict" keyword use
authorKarel Zak <kzak@redhat.com>
Fri, 22 Jan 2021 09:44:01 +0000 (10:44 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 22 Jan 2021 09:44:01 +0000 (10:44 +0100)
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 on travis-ci returns:

 libuuid/src/unparse.c:42:67: error: ‘restrict’ undeclared here (not in a function)
 libuuid/src/unparse.c: In function ‘uuid_fmt’:

Signed-off-by: Karel Zak <kzak@redhat.com>
libuuid/src/unparse.c

index b1d3e9b39bfc411d8b6bf5d2825410324c584dcd..f9a5e43153711544b4f27e23377fda33076c78a6 100644 (file)
@@ -39,7 +39,7 @@
 static char const hexdigits_lower[16] = "0123456789abcdef";
 static char const hexdigits_upper[16] = "0123456789ABCDEF";
 
-static void uuid_fmt(const uuid_t uuid, char *buf, char const fmt[restrict])
+static void uuid_fmt(const uuid_t uuid, char *buf, char const *restrict fmt)
 {
        char *p = buf;
        int i;