From: Philippe Waroquiers Date: Sun, 27 May 2012 20:21:02 +0000 (+0000) Subject: fix the warning introduced by fixing SETTLS clone flag PRE_READ logic X-Git-Tag: svn/VALGRIND_3_8_0~279 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec2e7c2bdfb1e6f9dbba63f9767e02fa2c4c9a2b;p=thirdparty%2Fvalgrind.git fix the warning introduced by fixing SETTLS clone flag PRE_READ logic on amd64, vki_modify_ldt_t was defined as void (not very clear why). sizeof (void) cannot be taken (or more precisely can be taken, but nobody knows what that means and what gcc does). So, uncommended the (supposedly) correct definition of the type. Note that I checked the definition on debian 6.0, kernel 2.6.32 and the structure is still ok. Still needed to look at the other platforms not properly handling the *SETTID and the SETTLS flags in clone PRE_READ logic and/or not defining the type vki_modify_ldt_t git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12589 --- diff --git a/include/vki/vki-amd64-linux.h b/include/vki/vki-amd64-linux.h index 18e458863d..db7b4e00fe 100644 --- a/include/vki/vki-amd64-linux.h +++ b/include/vki/vki-amd64-linux.h @@ -558,11 +558,13 @@ struct vki_ucontext { // type for x86 (the final 'lm' field is added); I'm not sure about the // significance of that... --njn -#if 0 /* [[Nb: This is the structure passed to the modify_ldt syscall. Just so as to confuse and annoy everyone, this is _not_ the same as an VgLdtEntry and has to be translated into such. The logic for doing so, in vg_ldt.c, is copied from the kernel sources.]] */ +/* Note also that a comment in ldt.h indicates that the below + contains several fields ignored on 64bit, and that modify_ldt + is rather for 32bit. */ struct vki_user_desc { unsigned int entry_number; unsigned long base_addr; @@ -578,9 +580,6 @@ struct vki_user_desc { // [[Nb: for our convenience within Valgrind, use a more specific name]] typedef struct vki_user_desc vki_modify_ldt_t; -#endif - -typedef void vki_modify_ldt_t; //---------------------------------------------------------------------- // From linux-2.6.11.2/include/asm-x86_64/ipcbuf.h