qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] softfloat: Fix warn about implicit conversion from int to int8_t
@ 2016-08-10 18:55 Pranith Kumar
  2016-08-10 19:00 ` Aurelien Jarno
  0 siblings, 1 reply; 3+ messages in thread
From: Pranith Kumar @ 2016-08-10 18:55 UTC (permalink / raw)
  To: Aurelien Jarno, Peter Maydell, open list:All patches CC here

Change the flag type to 'uint8_t' to fix the implicit conversion error.

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 fpu/softfloat-specialize.h | 2 +-
 include/fpu/softfloat.h    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fpu/softfloat-specialize.h b/fpu/softfloat-specialize.h
index 43d0890..f5aed72 100644
--- a/fpu/softfloat-specialize.h
+++ b/fpu/softfloat-specialize.h
@@ -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;
 }
diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h
index 0e57ee5..1bde349 100644
--- a/include/fpu/softfloat.h
+++ b/include/fpu/softfloat.h
@@ -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;
@@ -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
-- 
2.9.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] softfloat: Fix warn about implicit conversion from int to int8_t
  2016-08-10 18:55 [Qemu-devel] [PATCH] softfloat: Fix warn about implicit conversion from int to int8_t Pranith Kumar
@ 2016-08-10 19:00 ` Aurelien Jarno
  2016-08-15 16:17   ` Peter Maydell
  0 siblings, 1 reply; 3+ messages in thread
From: Aurelien Jarno @ 2016-08-10 19:00 UTC (permalink / raw)
  To: Pranith Kumar; +Cc: Peter Maydell, open list:All patches CC here

On 2016-08-10 14:55, Pranith Kumar wrote:
> Change the flag type to 'uint8_t' to fix the implicit conversion error.
> 
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> ---
>  fpu/softfloat-specialize.h | 2 +-
>  include/fpu/softfloat.h    | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/fpu/softfloat-specialize.h b/fpu/softfloat-specialize.h
> index 43d0890..f5aed72 100644
> --- a/fpu/softfloat-specialize.h
> +++ b/fpu/softfloat-specialize.h
> @@ -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;
>  }
> diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h
> index 0e57ee5..1bde349 100644
> --- a/include/fpu/softfloat.h
> +++ b/include/fpu/softfloat.h
> @@ -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;
> @@ -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

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] softfloat: Fix warn about implicit conversion from int to int8_t
  2016-08-10 19:00 ` Aurelien Jarno
@ 2016-08-15 16:17   ` Peter Maydell
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2016-08-15 16:17 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: Pranith Kumar, open list:All patches CC here

On 10 August 2016 at 20:00, Aurelien Jarno <aurelien@aurel32.net> wrote:
> On 2016-08-10 14:55, Pranith Kumar wrote:
>> 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>

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-15 16:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-10 18:55 [Qemu-devel] [PATCH] softfloat: Fix warn about implicit conversion from int to int8_t Pranith Kumar
2016-08-10 19:00 ` Aurelien Jarno
2016-08-15 16:17   ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).