[flac-dev] Patch to fix compiler warnings and error status collisions

Erik de Castro Lopo mle+la at mega-nerd.com
Tue Apr 15 01:32:50 PDT 2014


Lenny Maiorani wrote:

> This also causes a warning and looks like it is the wrong #ifdef. ioctl()
> is only used inside of a '#if !defined __ANDROID__'.
> 
> Note, this compiler warning was generated when compiling on Mac OSX 10.9
> with clang:
> 
>     utils.c:189:6: warning: implicit declaration of function 'ioctl' is
> invalid in C99 [-Wimplicit-function-declaration]

Sorry for the delay in replying to this.

Looking at the code I can see why you thought:

    -#ifdef GWINSZ_IN_SYS_IOCTL
    +#if !defined __ANDROID__

was the appropriate fix for this, but I think instead the fix should
be:


           int s[2];
           _scrsize (s);
           width = s[0];
   -#elif !defined __ANDROID__
   +#elif defined GWINSZ_IN_SYS_IOCTL
           struct winsize w;
           if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) != -1) width = w.ws_col;

I've commited this to git. Please test.

> Also, at the moment, TOT does not compile. It is missing the file
> fixed_intrin_sse2.c

Yeah, I got couple of notifications about that. It was fixed a couple of
days ago.

Cheers,
Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the flac-dev mailing list