Hi,
with GCC 4.3 and with LTP CVS snapshot from today i got following warning when
using the GCC Object Checking Builtins:
cc -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -g -Wall
-O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -g
-I../../../../include -Wall pec_listener.c -L../../../../lib -lltp -o
pec_listener
In function 'memset',
inlined from 'netlink_recv' at pec_listener.c:112,
inlined from 'main' at pec_listener.c:270:
/usr/include/bits/string3.h:85: warning: call to
__builtin___memset_chk will always overflow destination buffer
Signed-off-by: Daniel Gollub <[EMAIL PROTECTED]>
---
testcases/kernel/connectors/pec/pec_listener.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: ltp-full-20081017/testcases/kernel/connectors/pec/pec_listener.c
===================================================================
--- ltp-full-20081017.orig/testcases/kernel/connectors/pec/pec_listener.c
+++ ltp-full-20081017/testcases/kernel/connectors/pec/pec_listener.c
@@ -109,7 +109,7 @@ static int netlink_recv(int sd, struct s
struct iovec iov;
struct msghdr msg;
- memset(nlhdr, 0, NLMSG_SPACE(MAX_MSG_SIZE));
+ memset(nlhdr, 0, sizeof(struct nlmsghdr));
memset(&iov, 0, sizeof(iov));
memset(&msg, 0, sizeof(msg));
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list