INN 2.6.1 release candidate

Julien ÉLIE julien at trigofacile.com
Wed Nov 9 20:28:58 UTC 2016


Hi David,

> [dbz.c:1734]: (warning) Comparison of a boolean expression with an
> integer other
>  than 0 or 1.
> [dbz.c:1742]: (warning) Comparison of a boolean expression with an
> integer other
>  than 0 or 1.
>
> If a function returns bool, then comparisons with less than zero don't
> make much sense. I don't know why gcc doesn't complain about this.

Good catch!
As you say, strange that gcc doesn't see that (-Wbool-compare is enabled 
by -Wall).

Will be fixed in the final 2.6.1 release.

--- lib/dbz.c	(révision 10090)
+++ lib/dbz.c	(copie de travail)
@@ -1731,7 +1731,7 @@
      if (initialize) {
  	RemoveDBZ(history);
  	gettimeofday(&start, NULL);
-	if (dbzfresh(history, dbzsize(size)) < 0) {
+	if (!dbzfresh(history, dbzsize(size))) {
  	    fprintf(stderr, "cant dbzfresh %s\n", history);
  	    exit(1);
  	}
@@ -1739,7 +1739,7 @@
  	printf("dbzfresh: %d msec\n", timediffms(start, end));
      } else {
  	gettimeofday(&start, NULL);
-	if (dbzinit(history) < 0) {
+	if (!dbzinit(history)) {
  	    fprintf(stderr, "cant dbzinit %s\n", history);
  	    exit(1);
  	}

-- 
Julien ÉLIE

« Ce que j'aime chez vous, c'est que vous savez jusqu'où on va trop
   loin. » (Cocteau)


More information about the inn-workers mailing list