New warnings from Xcode 4.2's clang
From: Blair Zajac <blair_at_orcaware.com>
Date: Sat, 15 Oct 2011 21:09:22 -0700
I upgraded my Xcode to 4.2 following the iOS 5 release and then compiled svn 1.7.0 for MacPorts, which updated this weekend.
The new clang compiler generates many more, higher level warnings then I've seen before, which is pretty cool. Definitely worth upgrading your Xcode and switching to clang.
Here's the warnings in the 1.7.0 build, not including deprecation warnings.
subversion/libsvn_delta/compose_delta.c:707:31: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
There's a comment for this in our code:
/* ### FIXME: ptn_overlap is unsigned, so the if() condition
subversion/libsvn_client/merge.c:4565:9: warning: if statement has empty body [-
if (nbr_skips < notify_b->nbr_notifications)
subversion/libsvn_wc/copy.c:618:13: warning: 6 enumeration values not handled in
subversion/libsvn_diff/diff_file.c:2138:3: warning: data argument not used by format string [-Wformat-extra-args]
SVN_ERR(svn_stream_printf(btn->output_stream, btn->pool,
There's a bunch more of these warnings.
So all in all, svn 1.7.0 comes out pretty good. None of the above warnings are a bug, even the switch one from a cursory reading. It's nice to see a compiler warn about these.
Blair
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.