Skip to content

Commit

Permalink
Suppress clang's "unknown warning group -Wmaybe-uninitialized"
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewvoznytsa authored and eyalroz committed Nov 10, 2023
1 parent af78f24 commit 43b6e26
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/printf/printf.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,9 @@ static floating_point_t unapply_scaling(floating_point_t normalized, struct scal
#ifdef __GNUC__
// accounting for a static analysis bug in GCC 6.x and earlier
#pragma GCC diagnostic push
#if !defined(__has_warning) || __has_warning("-Wmaybe-uninitialized")
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#endif
return normalization.multiply ? normalized / normalization.raw_factor : normalized * normalization.raw_factor;
#ifdef __GNUC__
Expand Down Expand Up @@ -936,7 +938,9 @@ static void print_exponential_number(output_gadget_t* output, floating_point_t n
#ifdef __GNUC__
// accounting for a static analysis bug in GCC 6.x and earlier
#pragma GCC diagnostic push
#if !defined(__has_warning) || __has_warning("-Wmaybe-uninitialized")
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#endif
normalization.multiply = (floored_exp10 < 0 && abs_exp10_covered_by_powers_table);
#ifdef __GNUC__
Expand Down

0 comments on commit 43b6e26

Please sign in to comment.