OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] vzquota compilation fix for -Werror and signedness
[PATCH] vzquota compilation fix for -Werror and signedness [message #1264] Sat, 04 February 2006 15:37 Go to previous message
Maik Broemme is currently offline  Maik Broemme
Messages: 2
Registered: February 2006
Junior Member
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

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
 
Read Message
Read Message
Previous Topic: [ANNOUNCE] OpenVZ patch for 2.6.15 kernel
Next Topic: [PATCH 2/2] iptables 32bit compat layer
Goto Forum:
  


Current Time: Tue Jul 22 17:41:43 GMT 2025

Total time taken to generate the page: 0.11028 seconds