mirror of
https://github.com/gluster/glusterfs.git
synced 2026-02-05 15:48:40 +01:00
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>
This commit is contained in:
committed by
Amar Tumballi
parent
0f81517e2b
commit
bc838bb710
@@ -27,8 +27,6 @@
|
||||
#include <glusterfs/syscall.h>
|
||||
#include <glusterfs/common-utils.h>
|
||||
|
||||
extern rpc_clnt_prog_t *cli_rpc_prog;
|
||||
|
||||
int
|
||||
cli_cmd_global_help_cbk(struct cli_state *state, struct cli_cmd_word *in_word,
|
||||
const char **words, int wordcount);
|
||||
|
||||
@@ -18,10 +18,6 @@
|
||||
#include "cli-mem-types.h"
|
||||
#include "protocol-common.h"
|
||||
|
||||
extern struct rpc_clnt *global_rpc;
|
||||
|
||||
extern rpc_clnt_prog_t *cli_rpc_prog;
|
||||
|
||||
extern struct cli_cmd volume_cmds[];
|
||||
extern struct cli_cmd bitrot_cmds[];
|
||||
extern struct cli_cmd quota_cmds[];
|
||||
|
||||
@@ -20,10 +20,6 @@
|
||||
#include "protocol-common.h"
|
||||
#include <glusterfs/events.h>
|
||||
|
||||
extern struct rpc_clnt *global_rpc;
|
||||
|
||||
extern rpc_clnt_prog_t *cli_rpc_prog;
|
||||
|
||||
int
|
||||
cli_cmd_peer_help_cbk(struct cli_state *state, struct cli_cmd_word *in_word,
|
||||
const char **words, int wordcount);
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
#include "cli-cmd.h"
|
||||
#include "cli-mem-types.h"
|
||||
|
||||
extern rpc_clnt_prog_t *cli_rpc_prog;
|
||||
|
||||
int
|
||||
cli_cmd_snapshot_help_cbk(struct cli_state *state, struct cli_cmd_word *in_word,
|
||||
const char **words, int wordcount);
|
||||
|
||||
@@ -18,10 +18,6 @@
|
||||
#include "cli-mem-types.h"
|
||||
#include "protocol-common.h"
|
||||
|
||||
extern struct rpc_clnt *global_rpc;
|
||||
|
||||
extern rpc_clnt_prog_t *cli_rpc_prog;
|
||||
|
||||
int
|
||||
cli_cmd_system_help_cbk(struct cli_state *state, struct cli_cmd_word *in_word,
|
||||
const char **words, int wordcount);
|
||||
|
||||
@@ -28,10 +28,6 @@
|
||||
#include <glusterfs/common-utils.h>
|
||||
#include <glusterfs/events.h>
|
||||
|
||||
extern struct rpc_clnt *global_rpc;
|
||||
extern struct rpc_clnt *global_quotad_rpc;
|
||||
|
||||
extern rpc_clnt_prog_t *cli_rpc_prog;
|
||||
extern rpc_clnt_prog_t cli_quotad_clnt;
|
||||
|
||||
static int
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -47,9 +47,7 @@
|
||||
|
||||
enum gf_task_types { GF_TASK_TYPE_REBALANCE, GF_TASK_TYPE_REMOVE_BRICK };
|
||||
|
||||
extern struct rpc_clnt *global_quotad_rpc;
|
||||
rpc_clnt_prog_t cli_quotad_clnt;
|
||||
extern rpc_clnt_prog_t *cli_rpc_prog;
|
||||
|
||||
static int32_t
|
||||
gf_cli_remove_brick(call_frame_t *frame, xlator_t *this, void *data);
|
||||
|
||||
@@ -71,6 +71,7 @@ const char *argp_program_version =
|
||||
const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">";
|
||||
|
||||
struct rpc_clnt *global_quotad_rpc;
|
||||
|
||||
struct rpc_clnt *global_rpc;
|
||||
|
||||
rpc_clnt_prog_t *cli_rpc_prog;
|
||||
|
||||
@@ -189,6 +189,12 @@ typedef ssize_t (*cli_serialize_t)(struct iovec outmsg, void *args);
|
||||
|
||||
extern struct cli_state *global_state; /* use only in readline callback */
|
||||
|
||||
extern struct rpc_clnt *global_quotad_rpc;
|
||||
|
||||
extern struct rpc_clnt *global_rpc;
|
||||
|
||||
extern rpc_clnt_prog_t *cli_rpc_prog;
|
||||
|
||||
typedef const char *(*cli_selector_t)(void *wcon);
|
||||
|
||||
char *
|
||||
|
||||
Reference in New Issue
Block a user