Changeset: f27857f20348 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f27857f20348
Modified Files:
        common/stream/stream.c
        common/stream/xz_stream.c
Branch: makelibstreamgreatagain
Log Message:

Silence warnings from testweb


diffs (25 lines):

diff --git a/common/stream/stream.c b/common/stream/stream.c
--- a/common/stream/stream.c
+++ b/common/stream/stream.c
@@ -322,7 +322,9 @@ mnstr_va_set_error(stream *s, mnstr_erro
        // for gnu_printf format attribute' warning from gcc.
        // It's really eager to trace where the vsnprintf ends up, we need
        // the ? : to throw it off its scent.
-       void *f1 = 1 ? (void*)&vsnprintf : (void*)&atoi;
+       // Similarly, the parentheses around the 1 serve to suppress a Clang
+       // warning about dead code (the atoi).
+       void *f1 = (1) ? (void*)&vsnprintf : (void*)&atoi;
        int (*f)(char *str, size_t size, const char *format, va_list ap) = f1;
        f(start, end - start, fmt, ap);
 }
diff --git a/common/stream/xz_stream.c b/common/stream/xz_stream.c
--- a/common/stream/xz_stream.c
+++ b/common/stream/xz_stream.c
@@ -81,6 +81,7 @@ xz_work(inner_state_t *xz, pump_action a
                break;
        default:
                assert(0 /* unknown action */);
+               return PUMP_ERROR;
        }
 
        lzma_ret ret = lzma_code(&xz->strm, a);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to