[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: build: fix more warnings
From: |
gnunet |
Subject: |
[gnunet] branch master updated: build: fix more warnings |
Date: |
Mon, 09 Sep 2024 14:46:31 +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 385f60570 build: fix more warnings
385f60570 is described below
commit 385f60570188376e55cc1d351f335566fa75ee35
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Mon Sep 9 14:46:15 2024 +0200
build: fix more warnings
---
src/include/gnunet_cadet_service.h | 1 -
src/include/gnunet_fs_service.h | 2 +-
src/lib/gnsrecord/json_gnsrecord.c | 1 +
src/lib/util/consttime_memcmp.c | 3 +++
src/lib/util/os_priority.c | 10 +++++-----
src/service/cadet/cadet_api_drop_message.c | 3 +--
src/service/rest/identity_plugin.c | 27 ++++++++++++++-------------
src/service/rest/namestore_plugin.c | 15 ++++++++-------
src/service/rest/reclaim_plugin.c | 9 +++++----
9 files changed, 38 insertions(+), 33 deletions(-)
diff --git a/src/include/gnunet_cadet_service.h
b/src/include/gnunet_cadet_service.h
index 75a8bb8fc..0d801b7fd 100644
--- a/src/include/gnunet_cadet_service.h
+++ b/src/include/gnunet_cadet_service.h
@@ -268,7 +268,6 @@ GNUNET_CADET_get_mq (const struct GNUNET_CADET_Channel
*channel);
void
GNUNET_CADET_receive_done (struct GNUNET_CADET_Channel *channel);
-
/**
* Transitional function to convert an unsigned int port to a hash value.
* WARNING: local static value returned, NOT reentrant!
diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h
index dec8e9828..d9bd3a4dd 100644
--- a/src/include/gnunet_fs_service.h
+++ b/src/include/gnunet_fs_service.h
@@ -2460,7 +2460,7 @@ enum GNUNET_FS_DownloadOptions
* Also, probe downloads are not serialized on suspension. Normal
* clients should not use this!
*/
- GNUNET_FS_DOWNLOAD_IS_PROBE = (1 << 31)
+ GNUNET_FS_DOWNLOAD_IS_PROBE = (UINT32_C(1) << 31)
};
diff --git a/src/lib/gnsrecord/json_gnsrecord.c
b/src/lib/gnsrecord/json_gnsrecord.c
index f83c6e17b..9ab831117 100644
--- a/src/lib/gnsrecord/json_gnsrecord.c
+++ b/src/lib/gnsrecord/json_gnsrecord.c
@@ -27,6 +27,7 @@
#include "gnunet_util_lib.h"
#include "gnunet_json_lib.h"
#include "gnunet_gnsrecord_lib.h"
+#include "gnunet_gnsrecord_json_lib.h"
#define GNUNET_JSON_GNSRECORD_VALUE "value"
#define GNUNET_JSON_GNSRECORD_RECORD_DATA "data"
diff --git a/src/lib/util/consttime_memcmp.c b/src/lib/util/consttime_memcmp.c
index d4fa45a5b..d7fa9033a 100644
--- a/src/lib/util/consttime_memcmp.c
+++ b/src/lib/util/consttime_memcmp.c
@@ -127,6 +127,9 @@ SOFTWARE.
*/
#define USE_VOLATILE_TEMPORARY 0
+int
+consttime_memcmp (const void *b1, const void *b2, size_t len);
+
int
consttime_memcmp (const void *b1, const void *b2, size_t len)
{
diff --git a/src/lib/util/os_priority.c b/src/lib/util/os_priority.c
index 63d18dbe4..7967ee822 100644
--- a/src/lib/util/os_priority.c
+++ b/src/lib/util/os_priority.c
@@ -150,7 +150,7 @@ GNUNET_OS_install_parent_control_handler (void *cls)
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Not installing a handler because $%s is empty\n",
GNUNET_OS_CONTROL_PIPE);
- putenv (GNUNET_OS_CONTROL_PIPE "=");
+ setenv (GNUNET_OS_CONTROL_PIPE, "", 1);
return;
}
errno = 0;
@@ -158,7 +158,7 @@ GNUNET_OS_install_parent_control_handler (void *cls)
if ((0 != errno) || (env_buf == env_buf_end))
{
LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "strtoull", env_buf);
- putenv (GNUNET_OS_CONTROL_PIPE "=");
+ setenv (GNUNET_OS_CONTROL_PIPE, "", 1);
return;
}
if (pipe_fd >= FD_SETSIZE)
@@ -166,7 +166,7 @@ GNUNET_OS_install_parent_control_handler (void *cls)
LOG (GNUNET_ERROR_TYPE_ERROR,
"GNUNET_OS_CONTROL_PIPE `%s' contains garbage?\n",
env_buf);
- putenv (GNUNET_OS_CONTROL_PIPE "=");
+ setenv (GNUNET_OS_CONTROL_PIPE, "", 1);
return;
}
@@ -175,7 +175,7 @@ GNUNET_OS_install_parent_control_handler (void *cls)
if (NULL == control_pipe)
{
LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "open", env_buf);
- putenv (GNUNET_OS_CONTROL_PIPE "=");
+ setenv (GNUNET_OS_CONTROL_PIPE, "", 1);
return;
}
LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -186,7 +186,7 @@ GNUNET_OS_install_parent_control_handler (void *cls)
&parent_control_handler,
control_pipe);
spch = GNUNET_SCHEDULER_add_shutdown (&shutdown_pch, control_pipe);
- putenv (GNUNET_OS_CONTROL_PIPE "=");
+ setenv (GNUNET_OS_CONTROL_PIPE, "", 1);
}
diff --git a/src/service/cadet/cadet_api_drop_message.c
b/src/service/cadet/cadet_api_drop_message.c
index e172418c4..d929d5961 100644
--- a/src/service/cadet/cadet_api_drop_message.c
+++ b/src/service/cadet/cadet_api_drop_message.c
@@ -25,7 +25,6 @@
#include "platform.h"
#include "cadet.h"
-
/**
* Drop the next cadet message of a given type.
*
@@ -33,7 +32,7 @@
* @param ccn client channel number.
* @param type of cadet message to be dropped.
*/
-void
+static void
GNUNET_CADET_drop_message (struct GNUNET_MQ_Handle *mq,
struct GNUNET_CADET_ClientChannelNumber ccn,
uint16_t type)
diff --git a/src/service/rest/identity_plugin.c
b/src/service/rest/identity_plugin.c
index 76d6c0243..475558f87 100644
--- a/src/service/rest/identity_plugin.c
+++ b/src/service/rest/identity_plugin.c
@@ -32,6 +32,7 @@
#include "gnunet_util_lib.h"
#include "microhttpd.h"
#include <jansson.h>
+#include "identity_plugin.h"
/**
* Identity Namespace
@@ -333,7 +334,7 @@ do_error (void *cls)
* @param name the name of an identity (only one can be NULL)
* @return EgoEntry or NULL if not found
*/
-struct EgoEntry *
+static struct EgoEntry *
get_egoentry (struct RequestHandle *handle, char *pubkey, char *name)
{
struct EgoEntry *ego_entry;
@@ -369,7 +370,7 @@ get_egoentry (struct RequestHandle *handle, char *pubkey,
char *name)
* @param url the url
* @param cls the RequestHandle
*/
-void
+static void
ego_get_all (struct GNUNET_REST_RequestHandle *con_handle,
const char *url,
void *cls)
@@ -431,7 +432,7 @@ ego_get_all (struct GNUNET_REST_RequestHandle *con_handle,
* @param handle the struct RequestHandle
* @param ego_entry the struct EgoEntry for the response
*/
-void
+static void
ego_get_response (struct RequestHandle *handle, struct EgoEntry *ego_entry)
{
struct MHD_Response *resp;
@@ -480,7 +481,7 @@ ego_get_response (struct RequestHandle *handle, struct
EgoEntry *ego_entry)
* @param url the url
* @param cls the RequestHandle
*/
-void
+static void
ego_get_pubkey (struct GNUNET_REST_RequestHandle *con_handle,
const char *url,
void *cls)
@@ -518,7 +519,7 @@ ego_get_pubkey (struct GNUNET_REST_RequestHandle
*con_handle,
* @param url the url
* @param cls the RequestHandle
*/
-void
+static void
ego_get_name (struct GNUNET_REST_RequestHandle *con_handle,
const char *url,
void *cls)
@@ -606,7 +607,7 @@ do_finished_create (void *cls,
* @param handle the struct RequestHandle
* @param ego_entry the struct EgoEntry we want to edit
*/
-void
+static void
ego_edit (struct RequestHandle *handle, struct EgoEntry *ego_entry)
{
json_t *data_js;
@@ -691,7 +692,7 @@ ego_edit (struct RequestHandle *handle, struct EgoEntry
*ego_entry)
* @param url the url
* @param cls the RequestHandle
*/
-void
+static void
ego_edit_pubkey (struct GNUNET_REST_RequestHandle *con_handle,
const char *url,
void *cls)
@@ -729,7 +730,7 @@ ego_edit_pubkey (struct GNUNET_REST_RequestHandle
*con_handle,
* @param url the url
* @param cls the RequestHandle
*/
-void
+static void
ego_edit_name (struct GNUNET_REST_RequestHandle *con_handle,
const char *url,
void *cls)
@@ -767,7 +768,7 @@ ego_edit_name (struct GNUNET_REST_RequestHandle *con_handle,
* @param url the url
* @param cls the RequestHandle
*/
-void
+static void
ego_create (struct GNUNET_REST_RequestHandle *con_handle,
const char *url,
void *cls)
@@ -867,7 +868,7 @@ ego_create (struct GNUNET_REST_RequestHandle *con_handle,
* @param url the url
* @param cls the RequestHandle
*/
-void
+static void
ego_delete_pubkey (struct GNUNET_REST_RequestHandle *con_handle,
const char *url,
void *cls)
@@ -909,7 +910,7 @@ ego_delete_pubkey (struct GNUNET_REST_RequestHandle
*con_handle,
* @param url the url
* @param cls the RequestHandle
*/
-void
+static void
ego_delete_name (struct GNUNET_REST_RequestHandle *con_handle,
const char *url,
void *cls)
@@ -950,7 +951,7 @@ struct ego_sign_data_cls
struct RequestHandle *handle;
};
-void
+static void
ego_sign_data_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego)
{
struct RequestHandle *handle = ((struct ego_sign_data_cls *) cls)->handle;
@@ -1010,7 +1011,7 @@ ego_sign_data_cb (void *cls, struct GNUNET_IDENTITY_Ego
*ego)
* @param url the url
* @param cls the RequestHandle
*/
-void
+static void
ego_sign_data (struct GNUNET_REST_RequestHandle *con_handle,
const char *url,
void *cls)
diff --git a/src/service/rest/namestore_plugin.c
b/src/service/rest/namestore_plugin.c
index 8ea2457f2..9b1cc22a6 100644
--- a/src/service/rest/namestore_plugin.c
+++ b/src/service/rest/namestore_plugin.c
@@ -33,6 +33,7 @@
#include "gnunet_gnsrecord_json_lib.h"
#include "microhttpd.h"
#include <jansson.h>
+#include "namestore_plugin.h"
/**
* Namestore namespace
@@ -362,7 +363,7 @@ do_error (void *cls)
* @param name the name of an identity (only one can be NULL)
* @return EgoEntry or NULL if not found
*/
-struct EgoEntry *
+static struct EgoEntry *
get_egoentry_namestore (struct RequestHandle *handle, char *name)
{
struct EgoEntry *ego_entry;
@@ -581,7 +582,7 @@ ns_get_lookup_cb (void *cls,
* @param url the url
* @param cls the RequestHandle
*/
-void
+static void
namestore_get (struct GNUNET_REST_RequestHandle *con_handle,
const char *url,
void *cls)
@@ -872,7 +873,7 @@ bulk_tx_start (struct RequestHandle *handle)
* @param url the url
* @param cls the RequestHandle
*/
-void
+static void
namestore_import (struct GNUNET_REST_RequestHandle *con_handle,
const char *url,
void *cls)
@@ -921,7 +922,7 @@ namestore_import (struct GNUNET_REST_RequestHandle
*con_handle,
* @param url the url
* @param cls the RequestHandle
*/
-void
+static void
namestore_add_or_update (struct GNUNET_REST_RequestHandle *con_handle,
const char *url,
void *cls)
@@ -1009,7 +1010,7 @@ namestore_add_or_update (struct GNUNET_REST_RequestHandle
*con_handle,
* @param url the url
* @param cls the RequestHandle
*/
-void
+static void
namestore_update (struct GNUNET_REST_RequestHandle *con_handle,
const char *url,
void *cls)
@@ -1027,7 +1028,7 @@ namestore_update (struct GNUNET_REST_RequestHandle
*con_handle,
* @param url the url
* @param cls the RequestHandle
*/
-void
+static void
namestore_add (struct GNUNET_REST_RequestHandle *con_handle,
const char *url,
void *cls)
@@ -1045,7 +1046,7 @@ namestore_add (struct GNUNET_REST_RequestHandle
*con_handle,
* @param url the url
* @param cls the RequestHandle
*/
-void
+static void
namestore_delete (struct GNUNET_REST_RequestHandle *con_handle,
const char *url,
void *cls)
diff --git a/src/service/rest/reclaim_plugin.c
b/src/service/rest/reclaim_plugin.c
index 10b6b7bdc..1515802a1 100644
--- a/src/service/rest/reclaim_plugin.c
+++ b/src/service/rest/reclaim_plugin.c
@@ -38,6 +38,8 @@
#include "gnunet_rest_plugin.h"
#include "gnunet_signatures.h"
#include "json_reclaim.h"
+#include "reclaim_plugin.h"
+
/**
* REST root namespace
*/
@@ -884,7 +886,7 @@ add_attribute_cont (struct GNUNET_REST_RequestHandle
*con_handle,
*
* @return a GNUNET_RECLAIM_Attribute, containing the new value
*/
-struct GNUNET_RECLAIM_Attribute *
+static struct GNUNET_RECLAIM_Attribute *
parse_jwt (const struct GNUNET_RECLAIM_Credential *cred,
const char *claim)
{
@@ -1467,7 +1469,7 @@ REST_reclaim_process_request (void *plugin,
* @return NULL on error, otherwise the plugin context
*/
void *
-REST_reclaim_init (struct GNUNET_CONFIGURATION_Handle *c)
+REST_reclaim_init (const struct GNUNET_CONFIGURATION_Handle *c)
{
static struct Plugin plugin;
struct GNUNET_REST_Plugin *api;
@@ -1502,7 +1504,7 @@ REST_reclaim_init (struct GNUNET_CONFIGURATION_Handle *c)
* @param cls the plugin context (as returned by "init")
* @return always NULL
*/
-void *
+void
REST_reclaim_done (struct GNUNET_REST_Plugin *api)
{
struct Plugin *plugin = api->cls;
@@ -1530,7 +1532,6 @@ REST_reclaim_done (struct GNUNET_REST_Plugin *api)
GNUNET_free (api);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Identity Provider REST plugin is finished\n");
- return NULL;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.