[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: -cleanup various warnings
From: |
gnunet |
Subject: |
[gnunet] branch master updated: -cleanup various warnings |
Date: |
Tue, 11 Oct 2022 08:15:39 +0200 |
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 62ff1af48 -cleanup various warnings
new 24d9e961b Merge branch 'master' of git+ssh://git.gnunet.org/gnunet
62ff1af48 is described below
commit 62ff1af48c60b1fc5c5d21096d7134e0d60a7582
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Tue Oct 11 15:15:12 2022 +0900
-cleanup various warnings
---
src/namestore/gnunet-namestore-dbtool.c | 1 -
src/namestore/gnunet-service-namestore.c | 12 ++----------
src/namestore/plugin_namestore_postgres.c | 2 --
src/namestore/plugin_namestore_sqlite.c | 1 -
src/namestore/plugin_rest_namestore.c | 14 ++++++++++----
src/reclaim/plugin_rest_openid_connect.c | 14 ++++++++------
6 files changed, 20 insertions(+), 24 deletions(-)
diff --git a/src/namestore/gnunet-namestore-dbtool.c
b/src/namestore/gnunet-namestore-dbtool.c
index b0f7e2ab9..a1ecf5e71 100644
--- a/src/namestore/gnunet-namestore-dbtool.c
+++ b/src/namestore/gnunet-namestore-dbtool.c
@@ -73,7 +73,6 @@ run (void *cls,
const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
- const char *pkey_str;
char *db_lib_name;
char *emsg;
struct GNUNET_NAMESTORE_PluginFunctions *plugin;
diff --git a/src/namestore/gnunet-service-namestore.c
b/src/namestore/gnunet-service-namestore.c
index 64d3ec51b..305fe79f0 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -916,7 +916,6 @@ continue_store_activity (struct StoreActivity *sa,
unsigned int rd_count;
size_t name_len;
size_t rd_ser_len;
- uint32_t rid;
const char *name_tmp;
const char *rd_ser;
const char *buf;
@@ -1020,7 +1019,7 @@ client_disconnect_cb (void *cls,
{
struct NamestoreClient *nc = app_ctx;
struct ZoneIteration *no;
- struct StoreActivity *sa;
+ struct StoreActivity *sa = sa_head;
struct StoreActivity *sn;
char *emsg;
@@ -1650,20 +1649,14 @@ static void
handle_record_store (void *cls, const struct RecordStoreMessage *rp_msg)
{
struct NamestoreClient *nc = cls;
- size_t name_len;
- size_t rd_ser_len;
uint32_t rid;
uint16_t rd_set_count;
- const char *name_tmp;
char *emsg = NULL;
const char *buf;
- const char *rd_ser;
- unsigned int rd_count;
ssize_t read;
struct StoreActivity *sa;
struct RecordSet *rs;
enum GNUNET_GenericReturnValue res;
- int blocked = GNUNET_NO;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received NAMESTORE_RECORD_STORE message\n");
@@ -1741,7 +1734,7 @@ handle_tx_control (void *cls, const struct
TxControlMessage *tx_msg)
struct StoreActivity *sn;
enum GNUNET_GenericReturnValue ret;
char *emsg = NULL;
- int blocked;
+ int blocked = GNUNET_NO;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received TX_CONTROL message\n");
@@ -2171,7 +2164,6 @@ static void
monitor_unblock (struct ZoneMonitor *zm)
{
struct StoreActivity *sa = sa_head;
- int blocked = GNUNET_NO;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Unblocking zone monitor %p\n", zm);
diff --git a/src/namestore/plugin_namestore_postgres.c
b/src/namestore/plugin_namestore_postgres.c
index 4ac817f42..bfe006cba 100644
--- a/src/namestore/plugin_namestore_postgres.c
+++ b/src/namestore/plugin_namestore_postgres.c
@@ -224,9 +224,7 @@ database_prepare (struct Plugin *plugin)
static int
database_connect (struct Plugin *plugin)
{
- const struct GNUNET_PQ_ExecuteStatement *cr;
char *emsg;
- struct GNUNET_PQ_ExecuteStatement sc = GNUNET_PQ_EXECUTE_STATEMENT_END;
if (GNUNET_YES ==
GNUNET_CONFIGURATION_get_value_yesno (plugin->cfg,
diff --git a/src/namestore/plugin_namestore_sqlite.c
b/src/namestore/plugin_namestore_sqlite.c
index 35fd340ab..67440063b 100644
--- a/src/namestore/plugin_namestore_sqlite.c
+++ b/src/namestore/plugin_namestore_sqlite.c
@@ -835,7 +835,6 @@ database_connect (struct Plugin *plugin)
{
char *sqlite_filename;
char *emsg;
- int try_create = GNUNET_NO;
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_filename (plugin->cfg,
diff --git a/src/namestore/plugin_rest_namestore.c
b/src/namestore/plugin_rest_namestore.c
index 7a5a70fca..04ac95ee9 100644
--- a/src/namestore/plugin_rest_namestore.c
+++ b/src/namestore/plugin_rest_namestore.c
@@ -374,7 +374,9 @@ do_error (void *cls)
handle->response_code = MHD_HTTP_INTERNAL_SERVER_ERROR;
response = json_dumps (json_error, 0);
resp = GNUNET_REST_create_response (response);
- MHD_add_response_header (resp, "Content-Type", "application/json");
+ GNUNET_assert (MHD_YES ==
+ MHD_add_response_header (resp, "Content-Type",
+ "application/json"));
handle->proc (handle->proc_cls, resp, handle->response_code);
json_decref (json_error);
GNUNET_free (response);
@@ -524,7 +526,9 @@ namestore_list_finished (void *cls)
result_str = json_dumps (handle->resp_object, 0);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Result %s\n", result_str);
resp = GNUNET_REST_create_response (result_str);
- MHD_add_response_header (resp, "Content-Type", "application/json");
+ GNUNET_assert (MHD_YES ==
+ MHD_add_response_header (resp, "Content-Type",
+ "application/json"));
handle->proc (handle->proc_cls, resp, MHD_HTTP_OK);
GNUNET_free (result_str);
GNUNET_SCHEDULER_add_now (&cleanup_handle, handle);
@@ -1180,8 +1184,10 @@ options_cont (struct GNUNET_REST_RequestHandle
*con_handle,
// independent of path return all options
resp = GNUNET_REST_create_response (NULL);
- MHD_add_response_header (resp, "Access-Control-Allow-Methods",
- allow_methods);
+ GNUNET_assert (MHD_YES ==
+ MHD_add_response_header (resp,
+ "Access-Control-Allow-Methods",
+ allow_methods));
handle->proc (handle->proc_cls, resp, MHD_HTTP_OK);
GNUNET_SCHEDULER_add_now (&cleanup_handle, handle);
return;
diff --git a/src/reclaim/plugin_rest_openid_connect.c
b/src/reclaim/plugin_rest_openid_connect.c
index 7bb249c68..4ead538ec 100644
--- a/src/reclaim/plugin_rest_openid_connect.c
+++ b/src/reclaim/plugin_rest_openid_connect.c
@@ -2467,9 +2467,10 @@ consume_ticket (void *cls,
&cache_key);
if (NULL != cached_code)
{
- GNUNET_CONTAINER_multihashmap_remove (oidc_code_cache,
- &cache_key,
- cached_code);
+ GNUNET_assert (GNUNET_YES ==
+ GNUNET_CONTAINER_multihashmap_remove (oidc_code_cache,
+ &cache_key,
+ cached_code));
GNUNET_free (cached_code);
}
@@ -2562,9 +2563,10 @@ consume_fail (void *cls)
/**
* Remove the cached item
*/
- GNUNET_CONTAINER_multihashmap_remove (oidc_code_cache,
- &cache_key,
- cached_code);
+ GNUNET_assert (GNUNET_YES ==
+ GNUNET_CONTAINER_multihashmap_remove (oidc_code_cache,
+ &cache_key,
+ cached_code));
// decode code
if (GNUNET_OK != OIDC_parse_authz_code (&handle->ticket.audience,
--
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: -cleanup various warnings,
gnunet <=