Changeset: 57c390356432 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/57c390356432
Modified Files:
        gdk/gdk_select.c
Branch: Aug2024
Log Message:

Make sure variable is initialized on all paths.


diffs (35 lines):

diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c
--- a/gdk/gdk_select.c
+++ b/gdk/gdk_select.c
@@ -615,6 +615,7 @@ NAME##_##TYPE(BATiter *bi, struct candit
                        if (!li) {                                      \
                                /* open range on left */                \
                                if (vl == MAXVALUE##TYPE) {             \
+                                       *algo = "select: empty range";  \
                                        return 0;                       \
                                }                                       \
                                /* vl < x === vl+1 <= x */              \
@@ -632,6 +633,7 @@ NAME##_##TYPE(BATiter *bi, struct candit
                        if (!hi) {                                      \
                                /* open range on right */               \
                                if (vh == MINVALUE##TYPE) {             \
+                                       *algo = "select: empty range";  \
                                        return 0;                       \
                                }                                       \
                                /* x < vh === x <= vh-1 */              \
@@ -645,6 +647,7 @@ NAME##_##TYPE(BATiter *bi, struct candit
                        hval = true;                                    \
                }                                                       \
                if (vl > vh) {                                          \
+                       *algo = "select: empty range";  \
                        return 0;                                       \
                }                                                       \
        }                                                               \
@@ -889,6 +892,7 @@ fullscan_str(BATiter *bi, struct candite
                return 0;
        }
        if (pos == (var_t) -1) {
+               *algo = NULL;
                BBPreclaim(bn);
                return BUN_NONE;
        }
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to