Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Jan 2003 17:04:52 -0500 (EST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Alfred Perlstein <alfred@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern syscalls.master sysv_msg.c src/sys/sys         msg.h src/lib/libc/gen msgsnd.3
Message-ID:  <Pine.NEB.3.96L.1030126164855.24134O-100000@fledge.watson.org>
In-Reply-To: <200301262009.h0QK9YJ7082904@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Sun, 26 Jan 2003, Alfred Perlstein wrote:

> alfred      2003/01/26 12:09:34 PST
> 
>   Modified files:
>     sys/kern             syscalls.master sysv_msg.c 
>     sys/sys              msg.h 
>     lib/libc/gen         msgsnd.3 
>   Log:
>   Add const qualifier to data argument for msgsnd.
>   
>   PR: standards/45274
>   Submitted by: Craig Rodrigues <rodrigc@attbi.com>

paprika:~/freebsd/commit/HEAD/src/sys/i386/compile/GENERIC> make
sysv_msg.o
cc -c -O -pipe -mcpu=pentiumpro -Wall -Wredundant-decls -Wnested-externs
-Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline
-Wcast-qual  -fformat-extensions -ansi -g -nostdinc -I-  -I. -I../../..
-I../../../dev -I../../../contrib/dev/acpica -I../../../contrib/ipfilter
-D_KERNEL -include opt_global.h -fno-common  -mno-align-long-strings
-mpreferred-stack-boundary=2 -ffreestanding -Werror
../../../kern/sysv_msg.c
cc1: warnings being treated as errors
../../../kern/sysv_msg.c: In function `msgsnd':
../../../kern/sysv_msg.c:775: warning: cast discards qualifiers from
pointer target type
../../../kern/sysv_msg.c:818: warning: cast discards qualifiers from
pointer target type
*** Error code 1

Making type fixes is usually a bad idea unless you're willing to compile
them, not just commit them.  There seem to be several developers with a
with misunderstandings regarding compiling changes before committing them
in the last 24 hours.

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert@fledge.watson.org      Network Associates Laboratories

Index: sysv_msg.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/sysv_msg.c,v
retrieving revision 1.46
diff -u -r1.46 sysv_msg.c
--- sysv_msg.c	26 Jan 2003 20:09:34 -0000	1.46
+++ sysv_msg.c	26 Jan 2003 22:02:18 -0000
@@ -772,7 +772,7 @@
 		goto done2;
 	}
 	mtx_lock(&msq_mtx);
-	user_msgp = (char *)user_msgp + sizeof(msghdr->msg_type);
+	user_msgp = (const char *)user_msgp + sizeof(msghdr->msg_type);
 
 	/*
 	 * Validate the message type
@@ -815,7 +815,7 @@
 		}
 		mtx_lock(&msq_mtx);
 		msgsz -= tlen;
-		user_msgp = (char *)user_msgp + tlen;
+		user_msgp = (const char *)user_msgp + tlen;
 		next = msgmaps[next].next;
 	}
 	if (next != -1)


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1030126164855.24134O-100000>