Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fuzz fix and address Clang warnings #719

Merged
merged 2 commits into from
Jul 10, 2024
Merged
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
2 changes: 1 addition & 1 deletion include/share/alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
extern int alloc_check_threshold, alloc_check_counter;

static inline int alloc_check() {
static inline int alloc_check(void) {
if(alloc_check_threshold == INT32_MAX)
return 0;
else if(alloc_check_counter++ == alloc_check_threshold)
Expand Down
2 changes: 1 addition & 1 deletion src/metaflac/operations.c
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ void write_metadata(const char *filename, FLAC__StreamMetadata *block, unsigned
flac_printf("%c",block->data.application.data[i]);
else {
char replacement[4] = {0xef, 0xbf, 0xbd, 0}; /* Unicode replacement character */
flac_printf(replacement);
flac_printf("%s",replacement);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/share/grabbag/replaygain.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ FLAC__bool grabbag__replaygain_analyze(const FLAC__int32 * const input[], FLAC__
FLAC__int32 block_peak = 0, s;
uint32_t i, j;

FLAC__ASSERT(bps >= FLAC__MIN_BITS_PER_SAMPLE && bps <= FLAC__MAX_BITS_PER_SAMPLE);
FLAC__ASSERT(FLAC__MIN_BITS_PER_SAMPLE == 4 && FLAC__MAX_BITS_PER_SAMPLE == 32);
FLAC__ASSERT(bps > 0 && bps <= FLAC__MAX_BITS_PER_SAMPLE);
FLAC__ASSERT(FLAC__MAX_BITS_PER_SAMPLE == 32);

if(bps == 16) {
if(is_stereo) {
Expand Down
Loading