Skip to content

Commit

Permalink
droplet: fix some compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
arogge committed Nov 3, 2022
1 parent b3e4b26 commit e5065c3
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 28 deletions.
43 changes: 23 additions & 20 deletions core/src/droplet/libdroplet/include/droplet.h
Expand Up @@ -498,26 +498,29 @@ struct dpl_backend_s;

typedef struct dpl_ctx {
// Profile
int use_https : 1;
int encode_slashes : 1; /*!< Client wants slashes encoded */
int empty_folder_emulation : 1; /*!< Folders are represented as empty objects
(otherwise, they're purely virtual) */
int keep_alive : 1; /*!< Client supports keep-alive */
int url_encoding : 1; /*!< Some servers does not handle url encoding */
int preserve_root_path : 1; /*!< Preserve "/" for root path access in HTTP
requests */
int trace_buffers : 1;
int trace_binary : 1; /*!< Default is trace ascii */
int ssl_comp : 1; /*!< SSL compression support (default to false) */
int cert_verif : 1; /*!< SSL certificate verification (default to true) */
int max_redirects; /*!< Maximum number of redirects */
int n_conn_buckets; /*!< Number of buckets */
int n_conn_max; /*!< Max connexions */
int n_conn_max_hits; /*!< Before auto-close */
int conn_idle_time; /*!< Auto-close after (sec) */
int conn_timeout; /*!< Connection timeout (sec) */
int read_timeout; /*!< Read timeout (sec) */
int write_timeout; /*!< Write timeout (sec) */
unsigned int use_https : 1;
unsigned int encode_slashes : 1; /*!< Client wants slashes encoded */
unsigned int
empty_folder_emulation : 1; /*!< Folders are represented as empty objects
(otherwise, they're purely virtual) */
unsigned int keep_alive : 1; /*!< Client supports keep-alive */
unsigned int
url_encoding : 1; /*!< Some servers does not handle url encoding */
unsigned int preserve_root_path : 1; /*!< Preserve "/" for root path access in
HTTP requests */
unsigned int trace_buffers : 1;
unsigned int trace_binary : 1; /*!< Default is trace ascii */
unsigned int ssl_comp : 1; /*!< SSL compression support (default to false) */
unsigned int
cert_verif : 1; /*!< SSL certificate verification (default to true) */
int max_redirects; /*!< Maximum number of redirects */
int n_conn_buckets; /*!< Number of buckets */
int n_conn_max; /*!< Max connexions */
int n_conn_max_hits; /*!< Before auto-close */
int conn_idle_time; /*!< Auto-close after (sec) */
int conn_timeout; /*!< Connection timeout (sec) */
int read_timeout; /*!< Read timeout (sec) */
int write_timeout; /*!< Write timeout (sec) */
dpl_addrlist_t* addrlist; /*!< List of addresses to contact */
int cur_host; /*!< Current host beeing used in addrlist */
int blacklist_expiretime; /*!< Expiration time of blacklisting */
Expand Down
4 changes: 2 additions & 2 deletions core/src/droplet/libdroplet/src/backend/s3/auth/v4.c
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2021 Bareos GmbH & Co. KG
* Copyright (C) 2020-2022 Bareos GmbH & Co. KG
* Copyright (C) 2010 SCALITY SA. All rights reserved.
* http://www.scality.com
*
Expand Down Expand Up @@ -535,7 +535,7 @@ static dpl_status_t dpl_s3_insert_signature_v4_params(const dpl_req_t* req,
ret = create_signature(req, tm, sign_request, signature);
}

if (ret == DPL_SUCCESS) DPRINTF("Signature: %s\n", signature);
if (ret == DPL_SUCCESS) { DPRINTF("Signature: %s\n", signature); }

for (item = 0; item < canonical_params->n_items; item++) {
dpl_dict_var_t* param
Expand Down
6 changes: 3 additions & 3 deletions core/src/droplet/libdroplet/src/backend/s3/replyparser.c
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2021 Bareos GmbH & Co. KG
* Copyright (C) 2020-2022 Bareos GmbH & Co. KG
* Copyright (C) 2010 SCALITY SA. All rights reserved.
* http://www.scality.com
*
Expand Down Expand Up @@ -441,9 +441,9 @@ dpl_status_t dpl_s3_parse_list_bucket(const dpl_ctx_t* ctx,
common_prefixes);
if (ret != DPL_SUCCESS) break;
}
} else if (tmp->type == XML_TEXT_NODE)
} else if (tmp->type == XML_TEXT_NODE) {
DPRINTF("content: %s\n", tmp->content);

}
tmp = tmp->next;
}

Expand Down
4 changes: 2 additions & 2 deletions core/src/droplet/libdroplet/src/conn.c
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2021 Bareos GmbH & Co. KG
* Copyright (C) 2020-2022 Bareos GmbH & Co. KG
* Copyright (C) 2010 SCALITY SA. All rights reserved.
* http://www.scality.com
*
Expand Down Expand Up @@ -116,7 +116,7 @@ static int is_usable(dpl_conn_t* conn)
return 0;
}
}
/* fall down */
/* fallthrough */
case 0:
DPRINTF("is_usable: rv %d returning True\n", retval);
return 1;
Expand Down
2 changes: 1 addition & 1 deletion core/src/droplet/libdroplet/src/uks.c
Expand Up @@ -373,7 +373,7 @@ dpl_status_t dpl_uks_hash_set(BIGNUM* k, uint32_t hash)
{
int i;

if (hash < 0 || hash >= (1 << DPL_UKS_HASH_NBITS)) return DPL_FAILURE;
if (hash >= (1 << DPL_UKS_HASH_NBITS)) return DPL_FAILURE;

for (i = 0; i < DPL_UKS_HASH_NBITS; i++) {
if (hash & 1 << i)
Expand Down

0 comments on commit e5065c3

Please sign in to comment.