Re: [FFmpeg-devel] [PATCH] Fix MSVC warnings about possible value truncation.

2014-09-02 Thread Reimar Döffinger
On 03.09.2014, at 02:16, Peter Kasting wrote: > On Tue, Sep 2, 2014 at 5:10 PM, wm4 wrote: > >>> In the end, if we do decide to enable this warning, we will have to >> insert >>> some casts that are clearly safe, e.g. >>> >>> if (x > INT_MAX) >>>return; >>> int y = (int)x; >>> >>> Indeed

Re: [FFmpeg-devel] [PATCH] Fix MSVC warnings about possible value truncation.

2014-09-02 Thread wm4
On Tue, 2 Sep 2014 16:57:02 -0700 Peter Kasting wrote: > On Tue, Sep 2, 2014 at 4:46 PM, wm4 wrote: > > > > I tried not to "just plaster things with casts", but as I said, I was > > > counting on review feedback to help me understand where changes would be > > > fixing real problems or hiding r

Re: [FFmpeg-devel] [PATCH] Fix MSVC warnings about possible value truncation.

2014-09-02 Thread wm4
On Tue, 2 Sep 2014 16:34:58 -0700 Peter Kasting wrote: > On Tue, Sep 2, 2014 at 3:19 PM, wm4 wrote: > > > Here's why patches like these are bad: they're > > HUGE. Reviewing them takes a lot of time, and the result is > > questionable. How are we going to do v2 of this patch? And v3 etc.? > > Pr

Re: [FFmpeg-devel] [PATCH] Fix MSVC warnings about possible value truncation.

2014-09-02 Thread wm4
On Tue, 2 Sep 2014 23:43:33 +0200 Reimar Döffinger wrote: > On Tue, Sep 02, 2014 at 01:13:27PM -0700, Peter Kasting wrote: > > On Sat, Aug 30, 2014 at 2:21 AM, wm4 wrote: > > > I'd > > > expect it rather to hide bugs than to expose them. For example, it > > > could make a static analyzer with va

Re: [FFmpeg-devel] [PATCH] Fix MSVC warnings about possible value truncation.

2014-09-02 Thread wm4
On Fri, 29 Aug 2014 15:44:34 -0700 Peter Kasting wrote: > From 1c94e78d2b2037d492ea5abb3edb7960c8e98a1d Mon Sep 17 00:00:00 2001 > From: Peter Kasting > Date: Fri, 29 Aug 2014 15:31:41 -0700 > Subject: [PATCH] Fix MSVC warnings about possible value truncation. Tried to review it. Here's why pat

Re: [FFmpeg-devel] [PATCH] Fix MSVC warnings about possible value truncation.

2014-09-02 Thread Reimar Döffinger
On Tue, Sep 02, 2014 at 01:13:27PM -0700, Peter Kasting wrote: > On Sat, Aug 30, 2014 at 2:21 AM, wm4 wrote: > > I'd > > expect it rather to hide bugs than to expose them. For example, it > > could make a static analyzer with value range analysis stop working, > > because the casts will basically

Re: [FFmpeg-devel] [PATCH] Fix MSVC warnings about possible value truncation.

2014-08-30 Thread wm4
On Fri, 29 Aug 2014 15:52:25 -0700 Peter Kasting wrote: > On Fri, Aug 29, 2014 at 3:48 PM, Carl Eugen Hoyos wrote: > > > Peter Kasting google.com> writes: > > > > > The attached patch fixes instances of MSVC warning > > > C4244 about possible value truncation (e.g. when > > > assigning double

Re: [FFmpeg-devel] [PATCH] Fix MSVC warnings about possible value truncation.

2014-08-29 Thread Peter Kasting
On Fri, Aug 29, 2014 at 7:25 PM, Michael Niedermayer wrote: > On Fri, Aug 29, 2014 at 04:38:28PM -0700, Peter Kasting wrote: > > I think that reinforces why a change like this is important. These sorts > > of value truncations shouldn't just be invisibly, implicitly happening, > > since in many

Re: [FFmpeg-devel] [PATCH] Fix MSVC warnings about possible value truncation.

2014-08-29 Thread Michael Niedermayer
On Fri, Aug 29, 2014 at 04:38:28PM -0700, Peter Kasting wrote: > On Fri, Aug 29, 2014 at 4:26 PM, Reimar Döffinger > wrote: > > > First, this needs very, very careful review. I am not at all convinced > > that these will not change behaviour. > > > > I strongly agree that it needs careful review

Re: [FFmpeg-devel] [PATCH] Fix MSVC warnings about possible value truncation.

2014-08-29 Thread Peter Kasting
On Fri, Aug 29, 2014 at 4:26 PM, Reimar Döffinger wrote: > First, this needs very, very careful review. I am not at all convinced > that these will not change behaviour. > I strongly agree that it needs careful review. I think that reinforces why a change like this is important. These sorts of

Re: [FFmpeg-devel] [PATCH] Fix MSVC warnings about possible value truncation.

2014-08-29 Thread James Almer
On 29/08/14 8:26 PM, Reimar Döffinger wrote: > On 30.08.2014, at 00:44, Peter Kasting wrote: >> Hi FFMPEG devs, please forgive any errors here as I'm normally a Chromium >> developer and this is my first submission to FFMPEG. >> >> The attached patch fixes instances of MSVC warning C4244 about pos

Re: [FFmpeg-devel] [PATCH] Fix MSVC warnings about possible value truncation.

2014-08-29 Thread Michael Niedermayer
On Sat, Aug 30, 2014 at 01:26:46AM +0200, Reimar Döffinger wrote: > On 30.08.2014, at 00:44, Peter Kasting wrote: > > Hi FFMPEG devs, please forgive any errors here as I'm normally a Chromium > > developer and this is my first submission to FFMPEG. > > > > The attached patch fixes instances of MS

Re: [FFmpeg-devel] [PATCH] Fix MSVC warnings about possible value truncation.

2014-08-29 Thread Carl Eugen Hoyos
Reimar Döffinger gmx.de> writes: > Second, I believe powf and sinf are less commonly > available than pow and sin, so I think this will > break compilation on some platforms I fear this is correct. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-de

Re: [FFmpeg-devel] [PATCH] Fix MSVC warnings about possible value truncation.

2014-08-29 Thread Reimar Döffinger
On 30.08.2014, at 00:44, Peter Kasting wrote: > Hi FFMPEG devs, please forgive any errors here as I'm normally a Chromium > developer and this is my first submission to FFMPEG. > > The attached patch fixes instances of MSVC warning C4244 about possible > value truncation (e.g. when assigning doub

Re: [FFmpeg-devel] [PATCH] Fix MSVC warnings about possible value truncation.

2014-08-29 Thread Peter Kasting
On Fri, Aug 29, 2014 at 3:48 PM, Carl Eugen Hoyos wrote: > Peter Kasting google.com> writes: > > > The attached patch fixes instances of MSVC warning > > C4244 about possible value truncation (e.g. when > > assigning double to float or int64_t to int). > > This warning is currently disabled in C

Re: [FFmpeg-devel] [PATCH] Fix MSVC warnings about possible value truncation.

2014-08-29 Thread Carl Eugen Hoyos
Peter Kasting google.com> writes: > The attached patch fixes instances of MSVC warning > C4244 about possible value truncation (e.g. when > assigning double to float or int64_t to int). > This warning is currently disabled in Chromium's > MSVC build and > I'm trying to enable it. Why? Did yo