sane-project-website/old-archive/2001-05/0456.html

102 wiersze
4.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>sane-devel: Re: assert.h problems with shared libraries</TITLE>
<META NAME="Author" CONTENT="Nick Lamb (njl98r@ecs.soton.ac.uk)">
<META NAME="Subject" CONTENT="Re: assert.h problems with shared libraries">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Re: assert.h problems with shared libraries</H1>
<!-- received="Thu May 31 14:57:20 2001" -->
<!-- isoreceived="20010531215720" -->
<!-- sent="Thu, 31 May 2001 22:57:08 +0100" -->
<!-- isosent="20010531215708" -->
<!-- name="Nick Lamb" -->
<!-- email="njl98r@ecs.soton.ac.uk" -->
<!-- subject="Re: assert.h problems with shared libraries" -->
<!-- id="20010531225708.A14994@ecs.soton.ac.uk" -->
<!-- inreplyto="3B16B9F5.AB420280@rauch-domain.de" -->
<STRONG>From:</STRONG> Nick Lamb (<A HREF="mailto:njl98r@ecs.soton.ac.uk?Subject=Re:%20assert.h%20problems%20with%20shared%20libraries&In-Reply-To=&lt;20010531225708.A14994@ecs.soton.ac.uk&gt;"><EM>njl98r@ecs.soton.ac.uk</EM></A>)<BR>
<STRONG>Date:</STRONG> Thu May 31 2001 - 14:57:08 PDT
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0457.html">Oliver Schwartz: "Re: [PATCH] Re: SANE CVS snapshot (2001-05-30) available"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0455.html">Oliver Rauch: "Re: assert.h problems with shared libraries"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0455.html">Oliver Rauch: "Re: assert.h problems with shared libraries"</A>
<!-- nextthread="start" -->
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#456">[ date ]</A>
<A HREF="index.html#456">[ thread ]</A>
<A HREF="subject.html#456">[ subject ]</A>
<A HREF="author.html#456">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
On Thu, May 31, 2001 at 11:39:01PM +0200, Oliver Rauch wrote:
<BR>
<EM>&gt; An assert is an emergency stop. I think that most asserts can
</EM><BR>
<EM>&gt; be removed without any problems (if not we would have several
</EM><BR>
<EM>&gt; known problems).
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; I think we should do this:
</EM><BR>
<EM>&gt; 1) remove assert() where it is not necessary
</EM><BR>
<EM>&gt; 2) replace an assert(a&lt;b) by
</EM><BR>
<EM>&gt; if (a&lt;b) {DBG(0, &quot;error...&quot;); + exit or return with error code}
</EM><BR>
<P>So the solution is not to check for error conditions in SANE?
<BR>
Poor solution. Let's try to understand what's wrong on AIX and fix it.
<BR>
<P>Of COURSE removing assertions doesn't break code, that's not what
<BR>
assertions are for, they represent an element of programming by
<BR>
contract which is vitally important to the SANE design and not worth
<BR>
throwing away because of some config problems on AIX.
<BR>
<P>Nick.
<BR>
<P><P><PRE>
--
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20assert.h%20problems%20with%20shared%20libraries&In-Reply-To=&lt;20010531225708.A14994@ecs.soton.ac.uk&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0457.html">Oliver Schwartz: "Re: [PATCH] Re: SANE CVS snapshot (2001-05-30) available"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0455.html">Oliver Rauch: "Re: assert.h problems with shared libraries"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0455.html">Oliver Rauch: "Re: assert.h problems with shared libraries"</A>
<!-- nextthread="start" -->
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#456">[ date ]</A>
<A HREF="index.html#456">[ thread ]</A>
<A HREF="subject.html#456">[ subject ]</A>
<A HREF="author.html#456">[ author ]</A>
</UL>
<!-- trailer="footer" -->
<HR NOSHADE>
<P>
<SMALL>
<EM>
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
: <EM>Thu May 31 2001 - 14:58:10 PDT</EM>
</EM>
</SMALL>
</BODY>
</HTML>