Various fixes to the client-perms include files to stop gccs yelping
at high warning levels.  Partially due to Andreas Jaeger and
Hans-Peter Nilsson.

MERGE TO STABLE.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1457 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/helgrind/helgrind.h b/helgrind/helgrind.h
index b2f61d4..becf929 100644
--- a/helgrind/helgrind.h
+++ b/helgrind/helgrind.h
@@ -63,7 +63,7 @@
 typedef
    enum {
       VG_USERREQ__HG_CLEAN_MEMORY = VG_USERREQ_SKIN_BASE('H','G'),
-      VG_USERREQ__HG_KNOWN_RACE,
+      VG_USERREQ__HG_KNOWN_RACE
    } Vg_HelgrindClientRequest;
 
 /* Clean memory state.  This makes Helgrind forget everything it knew
diff --git a/include/valgrind.h b/include/valgrind.h
index e236245..c5cf5ab 100644
--- a/include/valgrind.h
+++ b/include/valgrind.h
@@ -61,13 +61,13 @@
 
 
 #ifndef __VALGRIND_SOMESKIN_H
-#warning  For valgrind versions 1.9.0 and after, 
-#warning  you should not include valgrind.h directly.
-#warning  Instead include the .h relevant to the skin 
-#warning  you want to use.  For most people this means 
-#warning  you need to include memcheck.h instead of
-#warning  valgrind.h.
-#error    Compilation of your source will now abort.
+  #warning  For valgrind versions 1.9.0 and after, 
+  #warning  you should not include valgrind.h directly.
+  #warning  Instead include the .h relevant to the skin 
+  #warning  you want to use.  For most people this means 
+  #warning  you need to include memcheck.h instead of
+  #warning  valgrind.h.
+  #error    Compilation of your source will now abort.
 #endif
 
 
@@ -151,7 +151,7 @@
 typedef
    enum { VG_USERREQ__RUNNING_ON_VALGRIND = 0x1001,
           VG_USERREQ__DISCARD_TRANSLATIONS,
-          VG_USERREQ__FINAL_DUMMY_CLIENT_REQUEST,
+          VG_USERREQ__FINAL_DUMMY_CLIENT_REQUEST
    } Vg_ClientRequest;
 
 
diff --git a/memcheck/memcheck.h b/memcheck/memcheck.h
index 151797a..d9d7964 100644
--- a/memcheck/memcheck.h
+++ b/memcheck/memcheck.h
@@ -79,7 +79,7 @@
       VG_USERREQ__DISCARD,
       VG_USERREQ__CHECK_WRITABLE,
       VG_USERREQ__CHECK_READABLE,
-      VG_USERREQ__DO_LEAK_CHECK, /* untested */
+      VG_USERREQ__DO_LEAK_CHECK /* untested */
    } Vg_MemCheckClientRequest;
 
 
@@ -90,32 +90,32 @@
    _qzz_len bytes.  Returns an int handle pertaining to the block
    descriptions Valgrind will use in subsequent error messages. */
 #define VALGRIND_MAKE_NOACCESS(_qzz_addr,_qzz_len)               \
-   ({unsigned int _qzz_res;                                      \
+   (__extension__({unsigned int _qzz_res;                        \
     VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0 /* default return */,    \
                             VG_USERREQ__MAKE_NOACCESS,           \
                             _qzz_addr, _qzz_len, 0, 0);          \
     _qzz_res;                                                    \
-   }) 
+   }))
       
 /* Similarly, mark memory at _qzz_addr as addressible but undefined
    for _qzz_len bytes. */
 #define VALGRIND_MAKE_WRITABLE(_qzz_addr,_qzz_len)               \
-   ({unsigned int _qzz_res;                                      \
+   (__extension__({unsigned int _qzz_res;                        \
     VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0 /* default return */,    \
                             VG_USERREQ__MAKE_WRITABLE,           \
                             _qzz_addr, _qzz_len, 0, 0);          \
     _qzz_res;                                                    \
-   })
+   }))
 
 /* Similarly, mark memory at _qzz_addr as addressible and defined
    for _qzz_len bytes. */
 #define VALGRIND_MAKE_READABLE(_qzz_addr,_qzz_len)               \
-   ({unsigned int _qzz_res;                                      \
+   (__extension__({unsigned int _qzz_res;                        \
     VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0 /* default return */,    \
                             VG_USERREQ__MAKE_READABLE,           \
                             _qzz_addr, _qzz_len, 0, 0);          \
     _qzz_res;                                                    \
-   })
+   }))
 
 /* Discard a block-description-handle obtained from the above three
    macros.  After this, Valgrind will no longer be able to relate
@@ -124,12 +124,12 @@
    in place.  Returns 1 for an invalid handle, 0 for a valid
    handle. */
 #define VALGRIND_DISCARD(_qzz_blkindex)                          \
-   ({unsigned int _qzz_res;                                      \
+   (__extension__ ({unsigned int _qzz_res;                       \
     VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0 /* default return */,    \
                             VG_USERREQ__DISCARD,                 \
                             0, _qzz_blkindex, 0, 0);             \
     _qzz_res;                                                    \
-   })
+   }))
 
 
 /* Client-code macros to check the state of memory. */
@@ -139,24 +139,24 @@
    error message and returns the address of the first offending byte.
    Otherwise it returns zero. */
 #define VALGRIND_CHECK_WRITABLE(_qzz_addr,_qzz_len)                \
-   ({unsigned int _qzz_res;                                        \
+   (__extension__({unsigned int _qzz_res;                          \
     VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0,                           \
                             VG_USERREQ__CHECK_WRITABLE,            \
                             _qzz_addr, _qzz_len, 0, 0);            \
     _qzz_res;                                                      \
-   })
+   }))
 
 /* Check that memory at _qzz_addr is addressible and defined for
    _qzz_len bytes.  If suitable addressibility and definedness are not
    established, Valgrind prints an error message and returns the
    address of the first offending byte.  Otherwise it returns zero. */
 #define VALGRIND_CHECK_READABLE(_qzz_addr,_qzz_len)                \
-   ({unsigned int _qzz_res;                                        \
+   (__extension__({unsigned int _qzz_res;                          \
     VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0,                           \
                             VG_USERREQ__CHECK_READABLE,            \
                             _qzz_addr, _qzz_len, 0, 0);            \
     _qzz_res;                                                      \
-   })
+   }))
 
 /* Use this macro to force the definedness and addressibility of a
    value to be checked.  If suitable addressibility and definedness