Branko Čibej wrote on Sun, May 26, 2013 at 20:00:01 +0200:
> On 26.05.2013 16:41, Barry Scott wrote:
> > I see the following warning when compiling on Mac OS X 10.8 with Xcode 
> > 4.6.2,
> > "Apple clang version 4.0 (tags/Apple/clang-421.0.60) (based on LLVM 
> > 3.1svn)".
> >
> > Would you be willing to change the code to fix the warning?
> >
> > subversion/libsvn_delta/svndiff.c:791:34: warning: adding 'apr_size_t' (aka 
> > 'unsigned long') to a string does not append to the string 
> > [-Wstring-plus-int]
> >       if (memcmp(buffer, "SVN\0" + db->header_bytes, nheader) == 0)
> >                          ~~~~~~~~^~~~~~~~~~~~~~~~~~
> > subversion/libsvn_delta/svndiff.c:791:34: note: use array indexing to 
> > silence this warning
> >       if (memcmp(buffer, "SVN\0" + db->header_bytes, nheader) == 0)
> >                                  ^
> >                          &       [                 ]
> > subversion/libsvn_delta/svndiff.c:793:39: warning: adding 'apr_size_t' (aka 
> > 'unsigned long') to a string does not append to the string 
> > [-Wstring-plus-int]
> >       else if (memcmp(buffer, "SVN\1" + db->header_bytes, nheader) == 0)
> >                               ~~~~~~~~^~~~~~~~~~~~~~~~~~
> > subversion/libsvn_delta/svndiff.c:793:39: note: use array indexing to 
> > silence this warning
> >       else if (memcmp(buffer, "SVN\1" + db->header_bytes, nheader) == 0)
> >                                       ^
> >                               &       [                 ]
> > 2 warnings generated.
> 
> These warnings are clearly silly. I've been actually thinking about
> disabling them because they only make a kind of sense for people who're
> not used to C.

+1, let's disable them.

Reply via email to