X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fmacro.h;h=7f89951d62e00ee5f68809e017c2572f1e174770;hb=d8d5781c1eb031477670facc132e198f8fddd56c;hp=ae2971fad141f54959bc89d0e50675f5faa2497a;hpb=6825a04de61f0bceab0ccddb34d825c3951caef1;p=elogind.git diff --git a/src/shared/macro.h b/src/shared/macro.h index ae2971fad..7f89951d6 100644 --- a/src/shared/macro.h +++ b/src/shared/macro.h @@ -67,6 +67,10 @@ _Pragma("GCC diagnostic push"); \ _Pragma("GCC diagnostic ignored \"-Wshadow\"") +#define DISABLE_WARNING_INCOMPATIBLE_POINTER_TYPES \ + _Pragma("GCC diagnostic push"); \ + _Pragma("GCC diagnostic ignored \"-Wincompatible-pointer-types\"") + #define REENABLE_WARNING \ _Pragma("GCC diagnostic pop") @@ -379,7 +383,8 @@ do { \ /* Returns the number of chars needed to format variables of the * specified type as a decimal string. Adds in extra space for a - * negative '-' prefix. */ + * negative '-' prefix (hence works correctly on signed + * types). Includes space for the trailing NUL. */ #define DECIMAL_STR_MAX(type) \ (2+(sizeof(type) <= 1 ? 3 : \ sizeof(type) <= 2 ? 5 : \