diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2019-11-20 15:59:07 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-01-30 11:59:14 +0100 |
commit | c135c66684d6fba899f26ddc1085494ee299fd4f (patch) | |
tree | 36fdfe20d1f12fba9460c9980a5a2a8f32fe1f89 | |
parent | 17a00ce1fcad6e0ce28d2312620ff27af12e618d (diff) |
libqcdm,modepref: fix warnings with -Wdiscarded-qualifiers
modepref.c: In function ‘main’:
modepref.c:539:11: warning: passing argument 1 of ‘putenv’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
539 | putenv ("QCDM_DEBUG=1");
| ^~~~~~~~~~~~~~
In file included from modepref.c:21:
/usr/include/stdlib.h:647:26: note: expected ‘char *’ but argument is of type ‘const char *’
647 | extern int putenv (char *__string) __THROW __nonnull ((1));
| ~~~~~~^~~~~~~~
-rw-r--r-- | libqcdm/tests/modepref.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libqcdm/tests/modepref.c b/libqcdm/tests/modepref.c index e5310d9c..f8855161 100644 --- a/libqcdm/tests/modepref.c +++ b/libqcdm/tests/modepref.c @@ -536,7 +536,7 @@ main (int argc, char *argv[]) } if (debug) - putenv ("QCDM_DEBUG=1"); + putenv ((char *)"QCDM_DEBUG=1"); fd = com_setup (dmport); if (fd < 0) |