Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- 'main'

env:
BUILDER_VERSION: v0.9.55
BUILDER_SOURCE: releases
BUILDER_VERSION: clang_path
BUILDER_SOURCE: channels
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
PACKAGE_NAME: aws-c-s3
LINUX_BASE_IMAGE: ubuntu-18-x64
Expand Down
2 changes: 1 addition & 1 deletion source/s3_auto_ranged_get.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ static bool s_check_empty_file_download_error(struct aws_s3_request *failed_requ
/* XML response */
struct aws_byte_cursor xml_doc = aws_byte_cursor_from_buf(&failed_body);
const char *path_to_size[] = {"Error", "ActualObjectSize", NULL};
struct aws_byte_cursor size = {0};
struct aws_byte_cursor size = {0, 0};
aws_xml_get_body_at_path(failed_request->allocator, xml_doc, path_to_size, &size);
if (aws_byte_cursor_eq_c_str(&size, "0")) {
return true;
Expand Down
6 changes: 3 additions & 3 deletions source/s3_auto_ranged_put.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ static int s_verify_part_matches_checksum(
return AWS_OP_ERR;
}

struct aws_byte_buf encoded_checksum = {0};
struct aws_byte_buf encoded_checksum = {0, 0, 0, 0};

int return_status = AWS_OP_SUCCESS;

Expand Down Expand Up @@ -1457,7 +1457,7 @@ static void s_s3_auto_ranged_put_request_finished(
struct aws_byte_cursor xml_doc = aws_byte_cursor_from_buf(&request->send_data.response_body);

/* Find the upload id for this multipart upload. */
struct aws_byte_cursor upload_id = {0};
struct aws_byte_cursor upload_id = {0, 0};
const char *xml_path[] = {"InitiateMultipartUploadResult", "UploadId", NULL};
aws_xml_get_body_at_path(meta_request->allocator, xml_doc, xml_path, &upload_id);

Expand Down Expand Up @@ -1588,7 +1588,7 @@ static void s_s3_auto_ranged_put_request_finished(
*/

/* Grab the ETag for the entire object, and set it as a header. */
struct aws_byte_cursor etag_header_value = {0};
struct aws_byte_cursor etag_header_value = {0, 0};
const char *xml_path[] = {"CompleteMultipartUploadResult", "ETag", NULL};
aws_xml_get_body_at_path(meta_request->allocator, xml_doc, xml_path, &etag_header_value);

Expand Down
6 changes: 3 additions & 3 deletions source/s3_copy_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ static struct aws_string *s_etag_new_from_upload_part_copy_response(
struct aws_byte_buf *response_body) {

struct aws_byte_cursor xml_doc = aws_byte_cursor_from_buf(response_body);
struct aws_byte_cursor etag_within_xml_quotes = {0};
struct aws_byte_cursor etag_within_xml_quotes = {0, 0};
const char *xml_path[] = {"CopyPartResult", "ETag", NULL};
aws_xml_get_body_at_path(allocator, xml_doc, xml_path, &etag_within_xml_quotes);

Expand Down Expand Up @@ -666,7 +666,7 @@ static void s_s3_copy_object_request_finished(
struct aws_byte_cursor xml_doc = aws_byte_cursor_from_buf(&request->send_data.response_body);

/* Find the upload id for this multipart upload. */
struct aws_byte_cursor upload_id = {0};
struct aws_byte_cursor upload_id = {0, 0};
const char *xml_path[] = {"InitiateMultipartUploadResult", "UploadId", NULL};
aws_xml_get_body_at_path(meta_request->allocator, xml_doc, xml_path, &upload_id);

Expand Down Expand Up @@ -754,7 +754,7 @@ static void s_s3_copy_object_request_finished(
struct aws_byte_cursor xml_doc = aws_byte_cursor_from_buf(&request->send_data.response_body);

/* Grab the ETag for the entire object, and set it as a header. */
struct aws_byte_cursor etag_header_value = {0};
struct aws_byte_cursor etag_header_value = {0, 0};
const char *xml_path[] = {"CompleteMultipartUploadResult", "ETag", NULL};
aws_xml_get_body_at_path(meta_request->allocator, xml_doc, xml_path, &etag_header_value);
if (etag_header_value.len > 0) {
Expand Down
2 changes: 1 addition & 1 deletion source/s3_meta_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,7 @@ static int s_s3_meta_request_error_code_from_response(struct aws_s3_request *req
if (request->send_data.response_body.len > 0) {
/* Attempt to read as XML, it's fine if this fails. */
struct aws_byte_cursor xml_doc = aws_byte_cursor_from_buf(&request->send_data.response_body);
struct aws_byte_cursor error_code_string = {0};
struct aws_byte_cursor error_code_string = {0, 0};
const char *xml_path[] = {"Error", "Code", NULL};
if (aws_xml_get_body_at_path(request->allocator, xml_doc, xml_path, &error_code_string) == AWS_OP_SUCCESS) {
/* Found an <Error><Code> string! Map it to CRT error code if retry-able. */
Expand Down
2 changes: 1 addition & 1 deletion source/s3_request_messages.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ struct aws_http_message *aws_s3_get_source_object_size_message_new(
/* From this point forward, the format is {bucket}/{key} - split
components.*/

struct aws_byte_cursor source_bucket = {0};
struct aws_byte_cursor source_bucket = {0, 0};

if (aws_byte_cursor_next_split(&request_path, '/', &source_bucket)) {
aws_byte_cursor_advance(&request_path, source_bucket.len);
Expand Down
2 changes: 1 addition & 1 deletion source/s3_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ int aws_s3_parse_request_range_header(
}

aws_byte_cursor_advance(&range_header_value, range_header_start.len);
struct aws_byte_cursor substr = {0};
struct aws_byte_cursor substr = {0, 0};
/* parse start range */
if (!aws_byte_cursor_next_split(&range_header_value, '-', &substr)) {
return aws_raise_error(AWS_ERROR_S3_INVALID_RANGE_HEADER);
Expand Down
4 changes: 2 additions & 2 deletions tests/s3_asyncwrite_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ static int s_test_s3_asyncwrite_tolerate_empty_writes(struct aws_allocator *allo
struct aws_byte_cursor source_cursor = aws_byte_cursor_from_buf(&tester.source_buf);

/* empty write at start */
struct aws_byte_cursor empty_data = {0};
struct aws_byte_cursor empty_data = {0, 0};
ASSERT_SUCCESS(s_write(&tester, empty_data, false /*eof*/));

/* write half the data */
Expand Down Expand Up @@ -454,7 +454,7 @@ static int s_test_s3_asyncwrite_fails_if_write_after_eof(struct aws_allocator *a
ASSERT_SUCCESS(s_write(&tester, aws_byte_cursor_from_buf(&tester.source_buf), true /*eof*/));

/* Any more writes should fail with INVALID_STATE error */
struct aws_byte_cursor empty_cursor = {0};
struct aws_byte_cursor empty_cursor = {0, 0};
struct aws_future_void *write_future = aws_s3_meta_request_write(tester.meta_request, empty_cursor, true /*eof*/);
ASSERT_TRUE(aws_future_void_wait(write_future, TIMEOUT_NANOS));
ASSERT_INT_EQUALS(AWS_ERROR_INVALID_STATE, aws_future_void_get_error(write_future));
Expand Down
8 changes: 4 additions & 4 deletions tests/s3_util_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ static int s_test_s3_aws_xml_get_body_at_path(struct aws_allocator *allocator, v

/* Ensure we can successfully look up <Error><Code> */
{
struct aws_byte_cursor error_code = {0};
struct aws_byte_cursor error_code = {0, 0};
const char *xml_path[] = {"Error", "Code", NULL};

ASSERT_SUCCESS(aws_xml_get_body_at_path(allocator, example_error_body, xml_path, &error_code));
Expand All @@ -702,7 +702,7 @@ static int s_test_s3_aws_xml_get_body_at_path(struct aws_allocator *allocator, v

/* Ensure we fail if the beginning of the path doesn't match */
{
struct aws_byte_cursor error_code = {0};
struct aws_byte_cursor error_code = {0, 0};
const char *xml_path[] = {"ObviouslyInvalidName", "Code", NULL};
ASSERT_ERROR(
AWS_ERROR_STRING_MATCH_NOT_FOUND,
Expand All @@ -711,7 +711,7 @@ static int s_test_s3_aws_xml_get_body_at_path(struct aws_allocator *allocator, v

/* Ensure we fail if the end of the path doesn't match */
{
struct aws_byte_cursor error_code = {0};
struct aws_byte_cursor error_code = {0, 0};
const char *xml_path[] = {"Error", "ObviouslyInvalidName", NULL};
ASSERT_ERROR(
AWS_ERROR_STRING_MATCH_NOT_FOUND,
Expand All @@ -720,7 +720,7 @@ static int s_test_s3_aws_xml_get_body_at_path(struct aws_allocator *allocator, v

/* Ensure we fail if the document isn't valid XML */
{
struct aws_byte_cursor error_code = {0};
struct aws_byte_cursor error_code = {0, 0};
const char *xml_path[] = {"Error", "Code", NULL};
ASSERT_ERROR(
AWS_ERROR_INVALID_XML,
Expand Down