X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fcast.h;h=802698da23ae2fcca48c158d464b4efd8b34eedb;hb=72ee644edd2f3dd7744baeff7dc513ad3800cf33;hp=00e42d6603cc68963f498c6d5ce0ab780c1b19f6;hpb=e30f5e6b6bf7a3b862dacce6b17635e8bf0d909d;p=pspp diff --git a/src/libpspp/cast.h b/src/libpspp/cast.h index 00e42d6603..802698da23 100644 --- a/src/libpspp/cast.h +++ b/src/libpspp/cast.h @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -99,11 +99,11 @@ not yet carefully examined the situation, or if you are not sure. Use CHAR_CAST if you are convinced that this is actually a correct cast. */ #define CHAR_CAST(TYPE, POINTER) \ - ((void) verify_true (sizeof (*(POINTER)) == 1), \ - (void) (sizeof (*(POINTER) + 1)), \ - (void) verify_true (sizeof (*(TYPE) NULL) == 1), \ - (void) (sizeof (*(TYPE) NULL + 1)), \ - (TYPE) (POINTER)) + ((void) verify_expr (sizeof (*(POINTER)) == 1, 1), \ + (void) (sizeof (*(POINTER) + 1)), \ + (void) verify_expr (sizeof (*(TYPE) NULL) == 1, 1), \ + (void) (sizeof (*(TYPE) NULL + 1)), \ + (TYPE) (POINTER)) #define CHAR_CAST_BUG(TYPE, POINTER) CHAR_CAST(TYPE, POINTER) /* Given POINTER, a pointer to the given MEMBER within structure