On 04/ 4/14 05:35 AM, Thomas Klausner wrote:
Hi!

clang doesn't like the WRITES macro xauth uses:

process.c:867:3: warning: if statement has empty body [-Wempty-body]
                 WRITES(STDERR_FILENO, "\n");
                 ^
process.c:641:57: note: expanded from macro 'WRITES'
#define WRITES(fd, S) {if(write((fd), (S), strlen((S))));}
                                                         ^
process.c:867:3: note: put the semicolon on a separate line to silence this 
warning
process.c:641:57: note: expanded from macro 'WRITES'
#define WRITES(fd, S) {if(write((fd), (S), strlen((S))));}

Why is there an empty if, anyway?

Looks like it was done to shut up a different compiler warning:

http://cgit.freedesktop.org/xorg/app/xauth/commit/?id=afeb2c22ba1f7193acf814954e66f40cfd699c17

--
        -Alan Coopersmith-              [email protected]
         Oracle Solaris Engineering - http://blogs.oracle.com/alanc
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to