Fix varbit initialisation
authorCédric Villemain <cedric@2ndquadrant.fr>
Thu, 15 Sep 2016 16:51:11 +0000 (18:51 +0200)
committerCédric Villemain <cedric@2ndquadrant.fr>
Thu, 15 Sep 2016 16:52:59 +0000 (18:52 +0200)
in some places it was set in a else {} part of the code, safe but trigger a warning from gcc.

pgfincore.c

index 668b7364a11d0ab5aec68c0d1fc3d7973b1d18aa..8ac5c6359fbcef554a362239ee6b3d5dc4750729 100644 (file)
@@ -675,8 +675,8 @@ pgfadvise_loader(PG_FUNCTION_ARGS)
 
        if (PG_ARGISNULL(5))
                elog(ERROR, "pgfadvise_loader: databit argument shouldn't be NULL");
-       else
-               databit         = PG_GETARG_VARBIT_P(5);
+
+        databit                = PG_GETARG_VARBIT_P(5);
 
        /* initialize nulls array to build the tuple */
        memset(nulls, 0, sizeof(nulls));
@@ -1113,8 +1113,8 @@ pgfincore_drawer(PG_FUNCTION_ARGS)
 
        if (PG_ARGISNULL(1))
                elog(ERROR, "pgfincore_drawer: databit argument shouldn't be NULL");
-       else
-               databit = PG_GETARG_VARBIT_P(0);
+
+        databit        = PG_GETARG_VARBIT_P(0);
 
        len =  VARBITLEN(databit);
        result = (char *) palloc((len/FINCORE_BITS) + 1);