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 next 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
Re: [PATCH] vzquota compilation fix for -Werror and signedness [message #1265 is a reply to message #1264] Sat, 04 February 2006 16:19 Go to previous message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Maik,

Thanks for reporting this!

It is already filed as bug #97, see http://bugzilla.openvz.org/97
We will fix it soon, to track the progress you can add yourself to Cc:
for this bug.

Regards,
Kir.

Maik Broemme wrote:

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


Current Time: Thu Apr 25 13:36:03 GMT 2024

Total time taken to generate the page: 0.01555 seconds