]> www.ginac.de Git - cln.git/commitdiff
Avoid "typedef ... locally defined but not used" warnings.
authorBruno Haible <bruno@clisp.org>
Sun, 27 Oct 2019 13:07:01 +0000 (14:07 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 27 Oct 2019 13:07:01 +0000 (14:07 +0100)
include/cln/number.h
include/cln/object.h

index b5ac95f922720d2787265f526c16709e61c5bb86..aeb7d2d20989b22bfd0b7ec01190dc7597625d9a 100644 (file)
@@ -257,7 +257,7 @@ template<class type>
 inline const type& the(const cl_number& x)
 {
        // check that sizeof(type)==sizeof(cl_number)
-       typedef int assertion1 [1 - 2 * (sizeof(type) != sizeof(cl_number))];
+       int (*dummy1)(int assertion1 [1 - 2 * (sizeof(type) != sizeof(cl_number))]); (void)dummy1;
        return *(const type *) &x;
 }
 // Conversions to subtypes without checking, macro version:
index 15c13593f4aa98b2b4d29d597444590238eab400..c7763af4a8f9a3b45f4ffd5df4eb6212ba8fc38d 100644 (file)
@@ -538,7 +538,7 @@ inline cl_private_thing as_cl_private_thing (const cl_rcpointer& x)
   #define CL_DEFINE_CONVERTER(target_class)  \
     operator const target_class & () const                             \
     {                                                                  \
-      typedef int assert1 [2*(sizeof(target_class)==sizeof(*this))-1]; \
+      int (*dummy1)(int assert1 [2*(sizeof(target_class)==sizeof(*this))-1]); (void)dummy1; \
       return * (const target_class *) (void*) this;                    \
     }