[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: DHT: Fix warnings when freeing allocated
From: |
gnunet |
Subject: |
[gnunet] branch master updated: DHT: Fix warnings when freeing allocated strings from GNUNET_STRINGS_get_utf8_args |
Date: |
Mon, 06 Feb 2023 07:04:43 +0100 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new eabc1baaf DHT: Fix warnings when freeing allocated strings from
GNUNET_STRINGS_get_utf8_args
eabc1baaf is described below
commit eabc1baaf980d8948f3fc0ac83a84446d5f1b226
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Mon Feb 6 15:03:33 2023 +0900
DHT: Fix warnings when freeing allocated strings from
GNUNET_STRINGS_get_utf8_args
A modification of ulfvonbelow's patch in #7651 that also silences
warnings.
---
src/dht/gnunet-dht-get.c | 4 ++++
src/dht/gnunet-dht-put.c | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/src/dht/gnunet-dht-get.c b/src/dht/gnunet-dht-get.c
index 1ae9235f8..02f04de26 100644
--- a/src/dht/gnunet-dht-get.c
+++ b/src/dht/gnunet-dht-get.c
@@ -284,6 +284,7 @@ run (void *cls,
int
main (int argc, char *const *argv)
{
+ char *u8_argv = NULL;
struct GNUNET_GETOPT_CommandLineOption options[] = {
GNUNET_GETOPT_option_string (
'k',
@@ -341,6 +342,9 @@ main (int argc, char *const *argv)
NULL))
? ret
: 1;
+ // This is ugly, but meh. The GNUNET_STRINGS_get_utf8_args allows us to do
this.
+ u8_argv = (char*) argv;
+ GNUNET_free (u8_argv);
}
diff --git a/src/dht/gnunet-dht-put.c b/src/dht/gnunet-dht-put.c
index 531107ef2..37e7911b5 100644
--- a/src/dht/gnunet-dht-put.c
+++ b/src/dht/gnunet-dht-put.c
@@ -179,6 +179,7 @@ run (void *cls,
int
main (int argc, char *const *argv)
{
+ char *u8_argv = NULL;
struct GNUNET_GETOPT_CommandLineOption options[] = {
GNUNET_GETOPT_option_string (
'd',
@@ -244,6 +245,9 @@ main (int argc, char *const *argv)
NULL))
? ret
: 1;
+ // This is ugly, but meh. The GNUNET_STRINGS_get_utf8_args allows us to do
this.
+ u8_argv = (char*) argv;
+ GNUNET_free (u8_argv);
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: DHT: Fix warnings when freeing allocated strings from GNUNET_STRINGS_get_utf8_args,
gnunet <=