[SCM] The rsync repository. - branch master updated
Rsync CVS commit messages
rsync-cvs at lists.samba.org
Sat May 30 00:27:27 UTC 2020
The branch, master has been updated
via 13f249a8 Silence some g++ warnings.
via c66e08ac Give configure's snprintf() test a guaranteed short string at the start.
via f5446552 Silence gcc7.1 warnings about snprintf().
from 364d302b Fix regex issue due to python 3.8 bug.
https://git.samba.org/?p=rsync.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 13f249a826c655f2a2dd08cc8b3b65eab90e0de3
Author: Wayne Davison <wayne at opencoder.net>
Date: Fri May 29 14:38:19 2020 -0700
Silence some g++ warnings.
commit c66e08acb3f73ffbbaa9aa515c5de4edb092c0b0
Author: Wayne Davison <wayne at opencoder.net>
Date: Fri May 29 14:37:49 2020 -0700
Give configure's snprintf() test a guaranteed short string at the start.
commit f5446552f318c01097e1b56449e4427c4e1dfa6e
Author: Wayne Davison <wayne at opencoder.net>
Date: Fri May 29 14:18:08 2020 -0700
Silence gcc7.1 warnings about snprintf().
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 2 +-
simd-checksum-x86_64.cpp | 13 +++++++------
socket.c | 5 ++---
util.c | 4 ++--
4 files changed, 12 insertions(+), 12 deletions(-)
Changeset truncated at 500 lines:
diff --git a/configure.ac b/configure.ac
index fc112875..c2771190 100644
--- a/configure.ac
+++ b/configure.ac
@@ -943,7 +943,7 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
void foo(const char *format, ...) {
va_list ap;
int len;
- char buf[5];
+ static char buf[] = "12345678901234567890";
va_start(ap, format);
len = vsnprintf(0, 0, format, ap);
diff --git a/simd-checksum-x86_64.cpp b/simd-checksum-x86_64.cpp
index cfbc8adf..66f72650 100644
--- a/simd-checksum-x86_64.cpp
+++ b/simd-checksum-x86_64.cpp
@@ -111,12 +111,13 @@ __attribute__ ((target("ssse3"))) static inline __m128i sse_maddubs_epi16(__m128
return _mm_maddubs_epi16(a, b);
}
-__attribute__ ((target("default"))) static inline __m128i sse_interleave_odd_epi16(__m128i a, __m128i b) { }
-__attribute__ ((target("default"))) static inline __m128i sse_interleave_even_epi16(__m128i a, __m128i b) { }
-__attribute__ ((target("default"))) static inline __m128i sse_mulu_odd_epi8(__m128i a, __m128i b) { }
-__attribute__ ((target("default"))) static inline __m128i sse_mulu_even_epi8(__m128i a, __m128i b) { }
-__attribute__ ((target("default"))) static inline __m128i sse_hadds_epi16(__m128i a, __m128i b) { }
-__attribute__ ((target("default"))) static inline __m128i sse_maddubs_epi16(__m128i a, __m128i b) { }
+/* These don't actually get called, but we need to define them. */
+__attribute__ ((target("default"))) static inline __m128i sse_interleave_odd_epi16(__m128i a, __m128i b) { return a; }
+__attribute__ ((target("default"))) static inline __m128i sse_interleave_even_epi16(__m128i a, __m128i b) { return a; }
+__attribute__ ((target("default"))) static inline __m128i sse_mulu_odd_epi8(__m128i a, __m128i b) { return a; }
+__attribute__ ((target("default"))) static inline __m128i sse_mulu_even_epi8(__m128i a, __m128i b) { return a; }
+__attribute__ ((target("default"))) static inline __m128i sse_hadds_epi16(__m128i a, __m128i b) { return a; }
+__attribute__ ((target("default"))) static inline __m128i sse_maddubs_epi16(__m128i a, __m128i b) { return a; }
/*
Original loop per 4 bytes:
diff --git a/socket.c b/socket.c
index e3133e28..70fb1695 100644
--- a/socket.c
+++ b/socket.c
@@ -73,9 +73,8 @@ static int establish_proxy_connection(int fd, char *host, int port,
authhdr = "";
}
- snprintf(buffer, sizeof buffer, "CONNECT %s:%d HTTP/1.0%s%s\r\n\r\n",
- host, port, authhdr, authbuf);
- len = strlen(buffer);
+ len = snprintf(buffer, sizeof buffer, "CONNECT %s:%d HTTP/1.0%s%s\r\n\r\n", host, port, authhdr, authbuf);
+ assert(len > 0 && len < (int)sizeof buffer);
if (write(fd, buffer, len) != len) {
rsyserr(FERROR, errno, "failed to write to proxy");
return -1;
diff --git a/util.c b/util.c
index edb3ae03..e1a75565 100644
--- a/util.c
+++ b/util.c
@@ -1342,10 +1342,10 @@ char *timestring(time_t t)
static char buffers[4][20]; /* We support 4 simultaneous timestring results. */
char *TimeBuf = buffers[ndx = (ndx + 1) % 4];
struct tm *tm = localtime(&t);
-
- snprintf(TimeBuf, sizeof buffers[0], "%4d/%02d/%02d %02d:%02d:%02d",
+ int len = snprintf(TimeBuf, sizeof buffers[0], "%4d/%02d/%02d %02d:%02d:%02d",
(int)tm->tm_year + 1900, (int)tm->tm_mon + 1, (int)tm->tm_mday,
(int)tm->tm_hour, (int)tm->tm_min, (int)tm->tm_sec);
+ assert(len > 0); /* Silence gcc warning */
return TimeBuf;
}
--
The rsync repository.
More information about the rsync-cvs
mailing list