diff options
author | Kaleb S. KEITHLEY <kkeithle@redhat.com> | 2020-07-06 16:19:08 -0400 |
---|---|---|
committer | Amar Tumballi <amar@kadalu.io> | 2020-07-09 04:23:57 +0000 |
commit | bc838bb710fae201df49130a2aedbc76b9fc35e8 (patch) | |
tree | 79f0036f2f5976aa82449d73670c11dfda791dfa /cli/src/cli-quotad-client.c | |
parent | 0f81517e2ba18f0be131fb3afa5aa333890104f2 (diff) |
cli: type mismatch global_quotad_rpc in cli-quotad-client.c
...
[ 236s] (.text+0x0): multiple definition of `cli_default_conn_timeout'; cli.o (symbol from plugin):(.text+0x0): first defined here
[ 236s] cli-quotad-client.c:13:24: warning: type of 'global_quotad_rpc' does not match original declaration [-Wlto-type-mismatch]
[ 236s] 13 | extern struct rpc_clnt global_quotad_rpc;
[ 236s] | ^
[ 236s] cli.c:80:18: note: 'global_quotad_rpc' was previously declared here
[ 236s] 80 | struct rpc_clnt *global_quotad_rpc;
[ 236s] | ^
[ 236s] cli.c:80:18: note: code may be misoptimized unless '-fno-strict-aliasing' is used
[ 239s] collect2: error: ld returned 1 exit status
...
move several global extern decls to cli.h.
Found on SUSE Tumbleweed w/ gcc-10 and LTO. This bug goes back
at least as far as release-6. Curiously this only popped up as an
error when building 6.9, not 7.4 or 8.0. And not when building
8.0 on Fedora rawhide/33.
Change-Id: I765642cea77b524a36368a7ff1a2976ef049dd0f
Fixes: #1356
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'cli/src/cli-quotad-client.c')
-rw-r--r-- | cli/src/cli-quotad-client.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/cli/src/cli-quotad-client.c b/cli/src/cli-quotad-client.c index 52ab97ee815..772b8f75bd9 100644 --- a/cli/src/cli-quotad-client.c +++ b/cli/src/cli-quotad-client.c @@ -10,9 +10,6 @@ #include "cli-quotad-client.h" -extern struct rpc_clnt global_quotad_rpc; -extern struct rpc_clnt_program cli_quotad_clnt; - int cli_quotad_submit_request(void *req, call_frame_t *frame, rpc_clnt_prog_t *prog, int procnum, struct iobref *iobref, xlator_t *this, @@ -60,7 +57,7 @@ cli_quotad_submit_request(void *req, call_frame_t *frame, rpc_clnt_prog_t *prog, } /* Send the msg */ - ret = rpc_clnt_submit(&global_quotad_rpc, prog, procnum, cbkfn, &iov, count, + ret = rpc_clnt_submit(global_quotad_rpc, prog, procnum, cbkfn, &iov, count, NULL, 0, iobref, frame, NULL, 0, NULL, 0, NULL); ret = 0; |