diff options
author | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2021-10-26 21:57:10 +0200 |
---|---|---|
committer | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2021-10-26 22:20:46 +0200 |
commit | e329fac278e3b6294966fd5fd00860744248ae69 (patch) | |
tree | badaebadec3c43049bfbf71ffa7a05069ef5c113 | |
parent | aa9097e27cc9e8e98d15a0e0892412fb5a878d08 (diff) | |
download | libgphoto2-e329fac278e3b6294966fd5fd00860744248ae69.tar.gz |
tests: declare local variable local
Declare local variable local by declaring it static.
This avoids the clang warning about the variable not being declared
static.
-rw-r--r-- | tests/test-pedantic-compilation.c | 1 | ||||
-rw-r--r-- | tests/test-pedantic-compilation.cxx | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/tests/test-pedantic-compilation.c b/tests/test-pedantic-compilation.c index f2b254b5d..2dab8cb5e 100644 --- a/tests/test-pedantic-compilation.c +++ b/tests/test-pedantic-compilation.c @@ -18,6 +18,7 @@ #include <gphoto2/gphoto2-port-version.h> #ifdef __STDC_VERSION__ +static unsigned long stdc_version = __STDC_VERSION__; #endif diff --git a/tests/test-pedantic-compilation.cxx b/tests/test-pedantic-compilation.cxx index b11dcc529..7d3251ee1 100644 --- a/tests/test-pedantic-compilation.cxx +++ b/tests/test-pedantic-compilation.cxx @@ -17,6 +17,7 @@ #include <gphoto2/gphoto2-port-result.h> #include <gphoto2/gphoto2-port-version.h> +static unsigned long cxx_version = __cplusplus; int main() |