Skip to content

Commit

Permalink
specific the warning disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
TingDaoK committed Jul 27, 2023
1 parent 4cdce6d commit f354f11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/aws/common/allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct aws_allocator *aws_default_allocator(void);

#ifdef __MACH__
/* Avoid pulling in CoreFoundation headers in a header file. */
struct __CFAllocator; /* NOLINT */
struct __CFAllocator; /* NOLINT(bugprone-reserved-identifier) */
typedef const struct __CFAllocator *CFAllocatorRef;

/**
Expand Down
2 changes: 1 addition & 1 deletion source/allocator.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ static void *s_cf_allocator_reallocate(void *ptr, CFIndex new_size, CFOptionFlag
aws_mem_realloc(allocator, &original_allocation, original_size, (size_t)new_size);

size_t new_allocation_size = (size_t)new_size;
memcpy(original_allocation, &new_allocation_size, sizeof(size_t)); /* NOLINT */
memcpy(original_allocation, &new_allocation_size, sizeof(size_t)); /* NOLINT(clang-analyzer-unix.cstring.NullArg) */

return (void *)((uint8_t *)original_allocation + sizeof(size_t));
}
Expand Down

0 comments on commit f354f11

Please sign in to comment.