From: Bruno Haible Date: Sun, 27 Oct 2019 13:07:01 +0000 (+0100) Subject: Avoid "typedef ... locally defined but not used" warnings. X-Git-Tag: cln_1-3-5~35 X-Git-Url: https://www.ginac.de/CLN/cln.git//cln.git?a=commitdiff_plain;h=1fdea8ecf018323dcca4425fce6a57546f34c29b;p=cln.git Avoid "typedef ... locally defined but not used" warnings. --- diff --git a/include/cln/number.h b/include/cln/number.h index b5ac95f..aeb7d2d 100644 --- a/include/cln/number.h +++ b/include/cln/number.h @@ -257,7 +257,7 @@ template 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: diff --git a/include/cln/object.h b/include/cln/object.h index 15c1359..c7763af 100644 --- a/include/cln/object.h +++ b/include/cln/object.h @@ -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; \ }