Repository: qpid-dispatch Updated Branches: refs/heads/master e39ef7bf9 -> e96256509
NO-JIRA: Fix some warnings in gcc 8.1.1 There is one remaining error in src/policy.c which I was unclear on, to suppress compile with cmake -DCMAKE_C_FLAGS=-Wno-stringop-truncation Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/e9625650 Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/e9625650 Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/e9625650 Branch: refs/heads/master Commit: e96256509d23d611426da8355cd9bf9f256e8173 Parents: acda247 Author: Alan Conway <acon...@redhat.com> Authored: Thu May 24 14:39:11 2018 -0400 Committer: Alan Conway <acon...@redhat.com> Committed: Thu May 24 14:49:32 2018 -0400 ---------------------------------------------------------------------- src/policy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/e9625650/src/policy.c ---------------------------------------------------------------------- diff --git a/src/policy.c b/src/policy.c index ae93c18..377aeac 100644 --- a/src/policy.c +++ b/src/policy.c @@ -517,7 +517,7 @@ char * _qd_policy_link_user_name_subst(const char *uname, const char *proposed, if (strlen(uname) == 0) return NULL; - const char *duser = "${user}"; + const char duser[] = "${user}"; char *retptr = obuf; const char *wiptr = proposed; const char *findptr = strstr(proposed, uname); @@ -535,7 +535,7 @@ char * _qd_policy_link_user_name_subst(const char *uname, const char *proposed, obuf += copysize; // Copy the substitution string - segsize = strlen(duser); + segsize = sizeof(duser); copysize = MIN(osize, segsize); if (copysize) strncpy(obuf, duser, copysize); @@ -581,7 +581,7 @@ bool _qd_policy_approve_link_name(const char *username, const char *allowed, con if (!pa) return false; - strncpy(pa, allowed, a_len); + strcpy(pa, allowed); /* We know we have allocated enoough space */ pa[a_len] = 0; // Do reverse user substitution into proposed char substbuf[QPALN_USERBUFSIZE]; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org