Skip to content

Commit

Permalink
Fixes #167: Suppress clang's "unknown warning group -Wmaybe-uninitial…
Browse files Browse the repository at this point in the history
…ized"
  • Loading branch information
andrewvoznytsa authored and eyalroz committed Nov 10, 2023
1 parent af78f24 commit b99f47d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/printf/printf.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,11 @@ 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)
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#elif __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 +940,11 @@ 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)
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#elif __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 b99f47d

Please sign in to comment.