Ticket #215 (closed defect: fixed)
pointer assert(3)'s assume sizeof(pointer) == sizeof(int)
| Reported by: | EricSchnoebelen | Owned by: | smoku |
|---|---|---|---|
| Priority: | minor | Component: | General |
| Version: | 2.1.24 | Keywords: | |
| Cc: | Tracforge_linkmap: | ||
| Blocking: | Blocked By: |
Description
in watching the compile of sx/sasl_gsasl.c on a NetBSD/alpha system, I saw a lot of warnings from gcc about converting a pointer to an integer if a different size.
In tracking it down, all of the occurrences were of the following form:
char *foo;
assert((int *)foo);
A better form, that would better describe the intent is:
char *foo;
assert((foo != NULL));
(I'm sure files other than sx/sasl_gsasl.c have similar constructs.)
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
