#define CREATE(result, type, number) do {\
if (!((result) = (type *) calloc ((number), sizeof(type))))\
{ perror("malloc failure"); abort(); } } while(0)
This creates a warning with my compiler:
Possibly incorrect assignment in function blah blah
It says to make the (a = b) to ((a = b) != 0) to surpass the warning,
and since I dont want to surpass ALL of the warnings of this type,
should I rewrite the macro like this?
#define CREATE(result, type, number) do {\
if (!(((result) = (type *) != 0) calloc((number), \
sizeof(type)))) { perror("malloc failure"); abort(); } } \
while(0)
Is this a good idea? Or will it ruin my mud? :)
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/08/00 PST