Skip to content

Commit

Permalink
softfloat: Fix warn about implicit conversion from int to int8_t
Browse files Browse the repository at this point in the history
Change the flag type to 'uint8_t' to fix the implicit conversion error.

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Message-id: 20160810185502.32015-1-bobby.prani@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
pranith authored and pm215 committed Aug 15, 2016
1 parent 94c9cb3 commit dfd6076
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fpu/softfloat-specialize.h
Expand Up @@ -197,7 +197,7 @@ float128 float128_default_nan(float_status *status)
| should be simply `float_exception_flags |= flags;'.
*----------------------------------------------------------------------------*/

void float_raise(int8_t flags, float_status *status)
void float_raise(uint8_t flags, float_status *status)
{
status->float_exception_flags |= flags;
}
Expand Down
4 changes: 2 additions & 2 deletions include/fpu/softfloat.h
Expand Up @@ -198,7 +198,7 @@ enum {
typedef struct float_status {
signed char float_detect_tininess;
signed char float_rounding_mode;
signed char float_exception_flags;
uint8_t float_exception_flags;
signed char floatx80_rounding_precision;
/* should denormalised results go to zero and set the inexact flag? */
flag flush_to_zero;
Expand Down Expand Up @@ -274,7 +274,7 @@ static inline flag get_default_nan_mode(float_status *status)
| Routine to raise any or all of the software IEC/IEEE floating-point
| exception flags.
*----------------------------------------------------------------------------*/
void float_raise(int8_t flags, float_status *status);
void float_raise(uint8_t flags, float_status *status);

/*----------------------------------------------------------------------------
| If `a' is denormal and we are in flush-to-zero mode then set the
Expand Down

0 comments on commit dfd6076

Please sign in to comment.