Change the ADDCARRY(x) macro to eliminate clang warning about unused

result from the ADDCARRY portion of the REDUCE macro.

-#define ADDCARRY(x)  (x > 65535 ? x -= 65535 : x)
+#define ADDCARRY(x)  {if ((x) > 65535) (x) -= 65535;}

The new code is from in_cksum.c in the Tahoe/CGI port of 4.4BSD-Lite2 (we're
using the "Portable Version" copy otherwise).


svn path=/trunk/; revision=35589
This commit is contained in:
Stephen Fisher 2011-01-19 22:53:38 +00:00
parent 32f6ab2248
commit c732e15d77
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@
* code and should be modified for each CPU to be as fast as possible.
*/
#define ADDCARRY(x) (x > 65535 ? x -= 65535 : x)
#define ADDCARRY(x) {if ((x) > 65535) (x) -= 65535;}
#define REDUCE {l_util.l = sum; sum = l_util.s[0] + l_util.s[1]; ADDCARRY(sum);}
int