INN commit: trunk (4 files)
INN Commit
rra at isc.org
Fri Aug 28 19:23:27 UTC 2015
Date: Friday, August 28, 2015 @ 12:23:27
Author: iulius
Revision: 9932
Update to latest rra-c-util release 5.8
Modified:
trunk/include/portable/macros.h
trunk/lib/network.c
trunk/lib/xwrite.c
trunk/tests/lib/snprintf-t.c
---------------------------+
include/portable/macros.h | 3 ++-
lib/network.c | 2 +-
lib/xwrite.c | 8 ++++----
tests/lib/snprintf-t.c | 2 +-
4 files changed, 8 insertions(+), 7 deletions(-)
Modified: include/portable/macros.h
===================================================================
--- include/portable/macros.h 2015-08-28 19:12:02 UTC (rev 9931)
+++ include/portable/macros.h 2015-08-28 19:23:27 UTC (rev 9932)
@@ -38,7 +38,8 @@
* variadic macro support.
*/
#if !defined(__attribute__) && !defined(__alloc_size__)
-# if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
+# if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)) \
+ && !defined(__clang__)
# define __alloc_size__(spec, args...) /* empty */
# endif
#endif
Modified: lib/network.c
===================================================================
--- lib/network.c 2015-08-28 19:12:02 UTC (rev 9931)
+++ lib/network.c 2015-08-28 19:23:27 UTC (rev 9932)
@@ -679,7 +679,7 @@
{
size_t total;
ssize_t status;
- int count = 0;
+ unsigned int count = 0;
/* Abort the read if we try 100 times with no forward progress. */
for (total = 0, status = 0; total < size; total += status) {
Modified: lib/xwrite.c
===================================================================
--- lib/xwrite.c 2015-08-28 19:12:02 UTC (rev 9931)
+++ lib/xwrite.c 2015-08-28 19:23:27 UTC (rev 9932)
@@ -81,7 +81,7 @@
{
size_t total;
ssize_t status;
- int count = 0;
+ unsigned int count = 0;
if (size == 0)
return 0;
@@ -109,7 +109,7 @@
{
size_t total;
ssize_t status;
- int count = 0;
+ unsigned int count = 0;
if (size == 0)
return 0;
@@ -138,7 +138,7 @@
{
ssize_t total, status = 0;
size_t left, offset;
- int iovleft, i, count;
+ unsigned int iovleft, i, count;
struct iovec *tmpiov;
/*
@@ -154,7 +154,7 @@
}
/* Get a count of the total number of bytes in the iov array. */
- for (total = 0, i = 0; i < iovcnt; i++)
+ for (total = 0, i = 0; i < (unsigned int) iovcnt; i++)
total += iov[i].iov_len;
if (total == 0)
return 0;
Modified: tests/lib/snprintf-t.c
===================================================================
--- tests/lib/snprintf-t.c 2015-08-28 19:12:02 UTC (rev 9931)
+++ tests/lib/snprintf-t.c 2015-08-28 19:23:27 UTC (rev 9932)
@@ -29,7 +29,7 @@
* Disable the requirement that format strings be literals. We need variable
* formats for easy testing.
*/
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2)
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2) || defined(__clang__)
# pragma GCC diagnostic ignored "-Wformat-nonliteral"
#endif
More information about the inn-committers
mailing list