emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master 74a5a33: Support native image transforms on MS-


From: Ken Brown
Subject: Re: [Emacs-diffs] master 74a5a33: Support native image transforms on MS-Windows
Date: Sat, 29 Jun 2019 19:21:11 +0000
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2

On 6/29/2019 7:55 AM, Eli Zaretskii wrote:
> branch: master
> commit 74a5a332fee8a346cf65ed6656c1b08dc1df5fde
> Author: Eli Zaretskii <address@hidden>
> Commit: Eli Zaretskii <address@hidden>
> 
>      Support native image transforms on MS-Windows

I'm seeing a few compiler warnings after this commit with GCC-7.4.0:

In file included from ../../master/src/image.c:37:0:
../../master/src/image.c: In function ‘image_set_transform’:
../../master/src/lisp.h:61:24: warning: implicit conversion from ‘float’ to 
‘double’ to match other operand of binary expression [-Wdouble-promotion]
  #define max(a, b) ((a) > (b) ? (a) : (b))
                         ^
../../master/src/image.c:2123:12: note: in expansion of macro ‘max’
    xscale = max (xscale, FLT_MIN);
             ^
../../master/src/lisp.h:61:36: warning: implicit conversion from ‘float’ to 
‘double’ to match other result of conditional [-Wdouble-promotion]
  #define max(a, b) ((a) > (b) ? (a) : (b))
                                     ^
../../master/src/image.c:2123:12: note: in expansion of macro ‘max’
    xscale = max (xscale, FLT_MIN);
             ^
../../master/src/image.c: In function ‘image_set_transform.isra.21’:
../../master/src/image.c:2136:14: warning: ‘sin_r’ may be used uninitialized in 
this function [-Wmaybe-uninitialized]
    int cos_r, sin_r;
               ^~~~~
../../master/src/image.c:2175:17: warning: ‘cos_r’ may be used uninitialized in 
this function [-Wmaybe-uninitialized]
        matrix3x3 rot = { [0][0] = cos_r, [0][1] = -sin_r,

The double-promotion warning is fixed by using DBL_MIN instead of FLT_MIN.

The maybe-uninitialized warnings seem bogus to me.

Ken

reply via email to

[Prev in Thread] Current Thread [Next in Thread]