Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjala committed Dec 13, 2024
1 parent fa1e93b commit ecc63e5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:

- name: Build + Install REST VOL
run: |
make
make -j
make install
shell: bash
working-directory: ${{github.workspace}}/vol-rest/
Expand Down Expand Up @@ -212,7 +212,7 @@ jobs:

- name: Build + Install REST VOL
run: |
make
make -j
make install
shell: bash
working-directory: ${{github.workspace}}/vol-rest/build
Expand Down
12 changes: 4 additions & 8 deletions src/rest_vol.c
Original file line number Diff line number Diff line change
Expand Up @@ -4125,8 +4125,7 @@ RV_curl_delete(CURL *curl_handle, server_info_t *server_info, const char *reques

strcpy(host_header, host_string);

curl_headers_local = curl_slist_append(
curl_headers_local, strncat(host_header, filename, host_header_len - strlen(host_string) - 1));
curl_headers_local = curl_slist_append(curl_headers_local, strcat(host_header, filename));

/* Disable use of Expect: 100 Continue HTTP response */
curl_headers_local = curl_slist_append(curl_headers_local, "Expect:");
Expand Down Expand Up @@ -4201,8 +4200,7 @@ RV_curl_put(CURL *curl_handle, server_info_t *server_info, const char *request_e

strcpy(host_header, host_string);

curl_headers_local = curl_slist_append(
curl_headers_local, strncat(host_header, filename, host_header_len - strlen(host_string) - 1));
curl_headers_local = curl_slist_append(curl_headers_local, strcat(host_header, filename));

/* Disable use of Expect: 100 Continue HTTP response */
curl_headers_local = curl_slist_append(curl_headers_local, "Expect:");
Expand Down Expand Up @@ -4301,8 +4299,7 @@ RV_curl_get(CURL *curl_handle, server_info_t *server_info, const char *request_e

strcpy(host_header, host_string);

curl_headers_local = curl_slist_append(
curl_headers_local, strncat(host_header, filename, host_header_len - strlen(host_string) - 1));
curl_headers_local = curl_slist_append(curl_headers_local, strcat(host_header, filename));

/* Specify type of content being sent through cURL */
switch (content_type) {
Expand Down Expand Up @@ -4387,8 +4384,7 @@ RV_curl_post(CURL *curl_handle, server_info_t *server_info, const char *request_

strcpy(host_header, host_string);

curl_headers_local = curl_slist_append(
curl_headers_local, strncat(host_header, filename, host_header_len - strlen(host_string) - 1));
curl_headers_local = curl_slist_append(curl_headers_local, strcat(host_header, filename));

/* Specify type of content being sent through cURL */
switch (content_type) {
Expand Down
9 changes: 4 additions & 5 deletions src/rest_vol_dataset.c
Original file line number Diff line number Diff line change
Expand Up @@ -1273,9 +1273,9 @@ RV_dataset_write(size_t count, void *dset[], hid_t mem_type_id[], hid_t _mem_spa
if (NULL == (transfer_info[i].u.write_info.point_sel_buf = RV_malloc(write_body_len + 1)))
FUNC_GOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate space for write buffer");

if ((bytes_printed =
snprintf(transfer_info[i].u.write_info.point_sel_buf, write_body_len + 1, fmt_string,
selection_body, transfer_info[i].u.write_info.base64_encoded_values)) < 0)
if ((bytes_printed = snprintf(transfer_info[i].u.write_info.point_sel_buf, write_body_len + 1,
fmt_string, selection_body,
(char *)transfer_info[i].u.write_info.base64_encoded_values)) < 0)
FUNC_GOTO_ERROR(H5E_DATASET, H5E_SYSERRSTR, FAIL, "snprintf error");

transfer_info[i].u.write_info.uinfo.buffer = transfer_info[i].u.write_info.point_sel_buf;
Expand Down Expand Up @@ -3498,8 +3498,7 @@ RV_convert_dataset_creation_properties_to_JSON(hid_t dcpl, char **creation_prope
const char *const external_file_str = "%s{"
"\"name\": %s,"
"\"offset\": " OFF_T_SPECIFIER ","
"\"size\": %llu"
"}";
"\"size\": " PRIuHSIZE "}";

/* Check whether the buffer needs to be grown */
bytes_to_print += strlen(external_storage_str);
Expand Down

0 comments on commit ecc63e5

Please sign in to comment.