Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 66620 invoked from network); 5 Dec 2003 13:04:04 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 5 Dec 2003 13:04:04 -0000 Received: (qmail 55208 invoked by uid 500); 5 Dec 2003 13:04:02 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 54999 invoked by uid 500); 5 Dec 2003 13:04:01 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 54978 invoked from network); 5 Dec 2003 13:04:00 -0000 Date: Fri, 5 Dec 2003 13:03:54 +0000 From: Joe Orton To: dev@apr.apache.org Subject: Re: cvs commit: apr/include apr_atomic.h Message-ID: <20031205130354.GA26025@manyfish.co.uk> Mail-Followup-To: dev@apr.apache.org References: <20031204200604.62119.qmail@minotaur.apache.org> <20031205065957.GA21797@manyfish.co.uk> <3FD06ADF.7020804@attglobal.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <3FD06ADF.7020804@attglobal.net> User-Agent: Mutt/1.4.1i X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Fri, Dec 05, 2003 at 06:24:15AM -0500, Jeff Trawick wrote: > Joe Orton wrote: > >apr_atomic.c: In function `apr_atomic_add32': > >apr_atomic.c:205: warning: `old_value' might be used uninitialized in this > >function > > > >I'd fix it but I'm not sure how... abort()? > >assert(apr_thread_mutex_lock(lock) == APR_SUCCESS) instead? return a > >random value since everything has gone to pot anyway? > I'd vote for abort() or assert(). Actually assert() like that would be bad since it's a noop if NDEBUG is defined, so abort() it is.