[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: rev 7867 - trunk/subversion/libsvn_fs

From: Branko Čibej <brane_at_xbc.nu>
Date: 2003-11-30 23:24:27 CET

dionisos@tigris.org wrote:

>Author: dionisos
>Date: Fri Nov 28 14:57:31 2003
>New Revision: 7867
>
>Modified:
> trunk/subversion/libsvn_fs/fs.c
>Log:
>Eliminate gcc -Wall compiler warning.
>
>* subversion/libsvn_fs/fs.c (bdb_write_config): add parens
> to avoid gcc -Wall ambiguity warning
>
>
>
>Modified: trunk/subversion/libsvn_fs/fs.c
>==============================================================================
>--- trunk/subversion/libsvn_fs/fs.c (original)
>+++ trunk/subversion/libsvn_fs/fs.c Fri Nov 28 14:57:31 2003
>@@ -493,8 +493,8 @@
> dbconfig_file_name);
> }
>
>- if ((DB_VERSION_MAJOR == dbconfig_options[i].bdb_major
>- && DB_VERSION_MINOR >= dbconfig_options[i].bdb_minor
>+ if (((DB_VERSION_MAJOR == dbconfig_options[i].bdb_major
>+ && DB_VERSION_MINOR >= dbconfig_options[i].bdb_minor)
> || DB_VERSION_MAJOR > dbconfig_options[i].bdb_major)
> && value != NULL && strcmp (value, "0") != 0)
> choice = dbconfig_options[i].active;
>
>

I really can't understand why GCC assumes that programmers don't know
about operator precedence. Especially in the case of && and ||, which
(unlike some other C operators) behave intuitively...

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Nov 30 23:24:53 2003

This is an archived mail posted to the Subversion Dev mailing list.