diff mbox series

[14/25] dbench.h: use bits/types.h instead of defining uint32

Message ID 20220209222610.438470-15-mcgrof@kernel.org (mailing list archive)
State New, archived
Headers show
Series dbench: fix compile warnings and update a bit | expand

Commit Message

Luis Chamberlain Feb. 9, 2022, 10:25 p.m. UTC
This fixes this compilation warning:

Compiling nfsio.o
gcc -g -g -O2 -Wall -W -I. -DVERSION=\"4.00\"
-DDATADIR=\"/usr/local/share\" `pkg-config --cflags libtirpc`
-Wimplicit-fallthrough=2 -c nfsio.c -o nfsio.o
In file included from nfsio.c:20:
dbench.h:105:16: error: two or more data types in declaration specifiers
  105 | #define uint32 unsigned int
      |                ^~~~~~~~
nfs.h:54:16: note: in expansion of macro ‘uint32’
   54 | typedef u_long uint32;
      |                ^~~~~~
dbench.h:105:25: error: two or more data types in declaration specifiers
  105 | #define uint32 unsigned int
      |                         ^~~
nfs.h:54:16: note: in expansion of macro ‘uint32’
   54 | typedef u_long uint32;
      |                ^~~~~~
In file included from nfsio.c:21:
nfs.h:54:1: warning: useless type name in empty declaration
   54 | typedef u_long uint32;
      | ^~~~~~~

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 dbench.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/dbench.h b/dbench.h
index 1fecd1a..7e628b2 100644
--- a/dbench.h
+++ b/dbench.h
@@ -102,7 +102,8 @@ 
 #define BOOL int
 #define True 1
 #define False 0
-#define uint32 unsigned
+
+#include <bits/types.h>
 
 struct op {
 	unsigned count;