Re: assert.h problems with shared libraries

From: Nick Lamb (njl98r@ecs.soton.ac.uk)
Date: Thu May 31 2001 - 14:57:08 PDT

  • Next message: Oliver Schwartz: "Re: [PATCH] Re: SANE CVS snapshot (2001-05-30) available"

    On Thu, May 31, 2001 at 11:39:01PM +0200, Oliver Rauch wrote:
    > An assert is an emergency stop. I think that most asserts can
    > be removed without any problems (if not we would have several
    > known problems).
    >
    > I think we should do this:
    > 1) remove assert() where it is not necessary
    > 2) replace an assert(a<b) by
    > if (a<b) {DBG(0, "error..."); + exit or return with error code}

    So the solution is not to check for error conditions in SANE?
    Poor solution. Let's try to understand what's wrong on AIX and fix it.

    Of COURSE removing assertions doesn't break code, that's not what
    assertions are for, they represent an element of programming by
    contract which is vitally important to the SANE design and not worth
    throwing away because of some config problems on AIX.

    Nick.

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
    



    This archive was generated by hypermail 2b29 : Thu May 31 2001 - 14:58:10 PDT