Unverified Commit 6c2939d6 by Patrick Steinhardt Committed by GitHub

Merge pull request #4646 from pks-t/pks/gcc-8.1-warnings

Fix GCC 8.1 warnings
parents 81ea9957 1bf57b5a
...@@ -252,6 +252,7 @@ int git_openssl_stream_global_init(void) ...@@ -252,6 +252,7 @@ int git_openssl_stream_global_init(void)
#if defined(GIT_THREADS) #if defined(GIT_THREADS)
static void threadid_cb(CRYPTO_THREADID *threadid) static void threadid_cb(CRYPTO_THREADID *threadid)
{ {
GIT_UNUSED(threadid);
CRYPTO_THREADID_set_numeric(threadid, git_thread_currentid()); CRYPTO_THREADID_set_numeric(threadid, git_thread_currentid());
} }
#endif #endif
......
...@@ -460,7 +460,7 @@ void test_iterator_workdir__icase_starts_and_ends(void) ...@@ -460,7 +460,7 @@ void test_iterator_workdir__icase_starts_and_ends(void)
static void build_workdir_tree(const char *root, int dirs, int subs) static void build_workdir_tree(const char *root, int dirs, int subs)
{ {
int i, j; int i, j;
char buf[64], sub[64]; char buf[64], sub[80];
for (i = 0; i < dirs; ++i) { for (i = 0; i < dirs; ++i) {
if (i % 2 == 0) { if (i % 2 == 0) {
......
...@@ -193,10 +193,7 @@ void test_refs_normalize__jgit_suite(void) ...@@ -193,10 +193,7 @@ void test_refs_normalize__jgit_suite(void)
char c; char c;
char buffer[GIT_REFNAME_MAX]; char buffer[GIT_REFNAME_MAX];
for (c = '\1'; c < ' '; c++) { for (c = '\1'; c < ' '; c++) {
strncpy(buffer, "refs/heads/mast", 15); p_snprintf(buffer, sizeof(buffer), "refs/heads/mast%cer", c);
strncpy(buffer + 15, (const char *)&c, 1);
strncpy(buffer + 16, "er", 2);
buffer[18 - 1] = '\0';
ensure_refname_invalid(GIT_REF_FORMAT_ALLOW_ONELEVEL, buffer); ensure_refname_invalid(GIT_REF_FORMAT_ALLOW_ONELEVEL, buffer);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment