From 47d064e905de29153d3930dfbbe9b07cd2aa0e05 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 15 Sep 2016 17:58:59 +0200 Subject: libjpeg config test: init variable Yes, yes, this is just a configure test, but why do something stupid in the code and then have to shut up Coverity manually? Fix by making it a global, which means it will be zero-initialized (I didn't want to do the obvious = 0, as that could protentially create a "0 used as nullptr" warning at some point in the future. Coverity-Id: 59485 Change-Id: I49ecd28be983a0e42b420d20da0db34a872c6f44 Reviewed-by: Thiago Macieira --- config.tests/unix/libjpeg/libjpeg.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config.tests/unix/libjpeg/libjpeg.cpp b/config.tests/unix/libjpeg/libjpeg.cpp index 68c11e1335..4432603b84 100644 --- a/config.tests/unix/libjpeg/libjpeg.cpp +++ b/config.tests/unix/libjpeg/libjpeg.cpp @@ -37,9 +37,10 @@ extern "C" { #include } +j_compress_ptr cinfo; + int main(int, char **) { - j_compress_ptr cinfo; jpeg_create_compress(cinfo); return 0; } -- cgit v1.2.3