[DRBD-cvs] svn commit by lars - r2546 - trunk/user - fix GCC
warning "dereferencing type-punned pointer" ...
drbd-cvs at lists.linbit.com
drbd-cvs at lists.linbit.com
Wed Oct 18 22:32:29 CEST 2006
Author: lars
Date: 2006-10-18 22:32:29 +0200 (Wed, 18 Oct 2006)
New Revision: 2546
Modified:
trunk/user/drbdsetup.c
Log:
fix GCC warning "dereferencing type-punned pointer" ...
standard says:
only (void *) and (char *) may be casted to anything,
not (void **) or (char **)
since we know this usage is ok regardless of alignment, we cast it into (void*) :-/
Modified: trunk/user/drbdsetup.c
===================================================================
--- trunk/user/drbdsetup.c 2006-10-18 20:17:58 UTC (rev 2545)
+++ trunk/user/drbdsetup.c 2006-10-18 20:32:29 UTC (rev 2546)
@@ -1072,7 +1072,7 @@
int flags;
unsigned int len;
- if(!consume_tag_blob(T_uuids,rtl,(char **) &uuids,&len)) {
+ if(!consume_tag_blob(T_uuids,rtl,(void *) &uuids,&len)) {
fprintf(stderr,"Reply payload did not carry an uuid-tag,\n"
"Probabely the device has no disk!\n");
return 1;
More information about the drbd-cvs
mailing list