[Devel] [PATCH] vzquota compilation fix for -Werror and signedness
Maik Broemme
mbroemme at plusserver.de
Sat Feb 4 07:39:24 PST 2006
Hi,
today after building my openvz development environment i just wanted to
build the userspace tools like vzquota and vzctl. I tried to build
vzquota with the default Makefile and CFLAGS which includes '-Werror'
GCC4 complains about the following:
cc1: warnings being treated as errors
quotaon.c: In function 'quotaugidset_proc':
quotaon.c:1228: warning: pointer targets in passing argument 2 of 'str2uint' differ in signedness
make[1]: *** [quotaon.o] Error 1
Attached is a small fix which only changes the 'int ugid' (which is default
signed) to 'unsigned int ugid' Nothing more. :)
--Maik
-------------- next part --------------
diff -Nur vzquota-2.7.0-7/src/quotaon.c vzquota-2.7.0-7-signedness-fix/src/quotaon.c
--- vzquota-2.7.0-7/src/quotaon.c 2005-09-12 17:46:07.000000000 +0200
+++ vzquota-2.7.0-7-signedness-fix/src/quotaon.c 2006-02-04 16:37:30.233562250 +0100
@@ -1221,7 +1221,7 @@
quota_setugid(0, NULL, &info);
} else {
struct dq_stat stat;
- int ugid;
+ unsigned int ugid;
/* get ugid */
if (argc != 5
More information about the Devel
mailing list