]> www.infradead.org Git - users/dwmw2/openconnect.git/commit
Silence compiler warnings [-Wdiscarded-qualifiers]
authorDimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
Wed, 29 Dec 2021 13:10:53 +0000 (14:10 +0100)
committerDimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
Sat, 9 Apr 2022 10:06:07 +0000 (12:06 +0200)
commitd5c9c6e1eadfe8267375452e77aad3b14338b6c1
tree91130535e4cc512f1ea7a95b2247dbb625c03c2c
parentb688b0a3e24e9f86f30fe24c5b9e41ad715c7cba
Silence compiler warnings [-Wdiscarded-qualifiers]

It's just a quirk that free takes non-const: it doesn't actually modify
the value pointed to, either conceptually or in practice, it merely looks
up the memory block using the pointer and deallocates it.

Unfortunately, the compiler will emit  warning when attempting to free()
a "const char *". So either switch to a pointer to non-const or cast to
(void *) when calling free() on a pointer to const.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
wintun.c