Ticket #215 (closed defect: fixed)

Opened 6 months ago

Last modified 6 months ago

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

jabberd2-assert.patch (7.8 KB) - added by EricSchnoebelen 6 months ago.
patch against today's SVN repository to clean up the asserts.

Change History

Changed 6 months ago by smoku

  • status changed from new to accepted

Changed 6 months ago by EricSchnoebelen

patch against today's SVN repository to clean up the asserts.

Changed 6 months ago by smoku

  • status changed from accepted to closed
  • resolution set to fixed

In [575]: Merged Eric Schnoebelen assert fixes. Closes #215

Note: See TracTickets for help on using tickets.