Remove dead assignments in various common files, spotted by clang analyzer
Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
d4c4e6fdc7
commit
9678d9501b
|
@ -829,7 +829,6 @@ static void console_clear_xy(TextConsole *s, int x, int y)
|
||||||
TextCell *c = &s->cells[y1 * s->width + x];
|
TextCell *c = &s->cells[y1 * s->width + x];
|
||||||
c->ch = ' ';
|
c->ch = ' ';
|
||||||
c->t_attrib = s->t_attrib_default;
|
c->t_attrib = s->t_attrib_default;
|
||||||
c++;
|
|
||||||
update_xy(s, x, y);
|
update_xy(s, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -575,7 +575,7 @@ static void blk_alloc(struct XenDevice *xendev)
|
||||||
static int blk_init(struct XenDevice *xendev)
|
static int blk_init(struct XenDevice *xendev)
|
||||||
{
|
{
|
||||||
struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev);
|
struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev);
|
||||||
int index, mode, qflags, have_barriers, info = 0;
|
int index, qflags, have_barriers, info = 0;
|
||||||
char *h;
|
char *h;
|
||||||
|
|
||||||
/* read xenstore entries */
|
/* read xenstore entries */
|
||||||
|
@ -609,10 +609,8 @@ static int blk_init(struct XenDevice *xendev)
|
||||||
|
|
||||||
/* read-only ? */
|
/* read-only ? */
|
||||||
if (strcmp(blkdev->mode, "w") == 0) {
|
if (strcmp(blkdev->mode, "w") == 0) {
|
||||||
mode = O_RDWR;
|
|
||||||
qflags = BDRV_O_RDWR;
|
qflags = BDRV_O_RDWR;
|
||||||
} else {
|
} else {
|
||||||
mode = O_RDONLY;
|
|
||||||
qflags = 0;
|
qflags = 0;
|
||||||
info |= VDISK_READONLY;
|
info |= VDISK_READONLY;
|
||||||
}
|
}
|
||||||
|
|
|
@ -346,7 +346,7 @@ static int launch_script(const char *setup_script, const char *ifname, int fd)
|
||||||
parg = args;
|
parg = args;
|
||||||
*parg++ = (char *)setup_script;
|
*parg++ = (char *)setup_script;
|
||||||
*parg++ = (char *)ifname;
|
*parg++ = (char *)ifname;
|
||||||
*parg++ = NULL;
|
*parg = NULL;
|
||||||
execv(setup_script, args);
|
execv(setup_script, args);
|
||||||
_exit(1);
|
_exit(1);
|
||||||
} else if (pid > 0) {
|
} else if (pid > 0) {
|
||||||
|
|
|
@ -110,7 +110,6 @@ int cksum(struct mbuf *m, int len)
|
||||||
if (byte_swapped) {
|
if (byte_swapped) {
|
||||||
REDUCE;
|
REDUCE;
|
||||||
sum <<= 8;
|
sum <<= 8;
|
||||||
byte_swapped = 0;
|
|
||||||
if (mlen == -1) {
|
if (mlen == -1) {
|
||||||
s_util.c[1] = *(u_int8_t *)w;
|
s_util.c[1] = *(u_int8_t *)w;
|
||||||
sum += s_util.s;
|
sum += s_util.s;
|
||||||
|
|
|
@ -550,14 +550,18 @@ void tcg_register_helper(void *func, const char *name)
|
||||||
void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags,
|
void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags,
|
||||||
int sizemask, TCGArg ret, int nargs, TCGArg *args)
|
int sizemask, TCGArg ret, int nargs, TCGArg *args)
|
||||||
{
|
{
|
||||||
|
#ifdef TCG_TARGET_I386
|
||||||
int call_type;
|
int call_type;
|
||||||
|
#endif
|
||||||
int i;
|
int i;
|
||||||
int real_args;
|
int real_args;
|
||||||
int nb_rets;
|
int nb_rets;
|
||||||
TCGArg *nparam;
|
TCGArg *nparam;
|
||||||
*gen_opc_ptr++ = INDEX_op_call;
|
*gen_opc_ptr++ = INDEX_op_call;
|
||||||
nparam = gen_opparam_ptr++;
|
nparam = gen_opparam_ptr++;
|
||||||
|
#ifdef TCG_TARGET_I386
|
||||||
call_type = (flags & TCG_CALL_TYPE_MASK);
|
call_type = (flags & TCG_CALL_TYPE_MASK);
|
||||||
|
#endif
|
||||||
if (ret != TCG_CALL_DUMMY_ARG) {
|
if (ret != TCG_CALL_DUMMY_ARG) {
|
||||||
#if TCG_TARGET_REG_BITS < 64
|
#if TCG_TARGET_REG_BITS < 64
|
||||||
if (sizemask & 1) {
|
if (sizemask & 1) {
|
||||||
|
|
13
vnc.c
13
vnc.c
|
@ -1234,17 +1234,16 @@ static long vnc_client_write_plain(VncState *vs)
|
||||||
*/
|
*/
|
||||||
void vnc_client_write(void *opaque)
|
void vnc_client_write(void *opaque)
|
||||||
{
|
{
|
||||||
long ret;
|
|
||||||
VncState *vs = opaque;
|
VncState *vs = opaque;
|
||||||
|
|
||||||
#ifdef CONFIG_VNC_SASL
|
#ifdef CONFIG_VNC_SASL
|
||||||
if (vs->sasl.conn &&
|
if (vs->sasl.conn &&
|
||||||
vs->sasl.runSSF &&
|
vs->sasl.runSSF &&
|
||||||
!vs->sasl.waitWriteSSF)
|
!vs->sasl.waitWriteSSF) {
|
||||||
ret = vnc_client_write_sasl(vs);
|
vnc_client_write_sasl(vs);
|
||||||
else
|
} else
|
||||||
#endif /* CONFIG_VNC_SASL */
|
#endif /* CONFIG_VNC_SASL */
|
||||||
ret = vnc_client_write_plain(vs);
|
vnc_client_write_plain(vs);
|
||||||
}
|
}
|
||||||
|
|
||||||
void vnc_read_when(VncState *vs, VncReadEvent *func, size_t expecting)
|
void vnc_read_when(VncState *vs, VncReadEvent *func, size_t expecting)
|
||||||
|
@ -1725,12 +1724,8 @@ static void framebuffer_update_request(VncState *vs, int incremental,
|
||||||
int x_position, int y_position,
|
int x_position, int y_position,
|
||||||
int w, int h)
|
int w, int h)
|
||||||
{
|
{
|
||||||
if (x_position > ds_get_width(vs->ds))
|
|
||||||
x_position = ds_get_width(vs->ds);
|
|
||||||
if (y_position > ds_get_height(vs->ds))
|
if (y_position > ds_get_height(vs->ds))
|
||||||
y_position = ds_get_height(vs->ds);
|
y_position = ds_get_height(vs->ds);
|
||||||
if (x_position + w >= ds_get_width(vs->ds))
|
|
||||||
w = ds_get_width(vs->ds) - x_position;
|
|
||||||
if (y_position + h >= ds_get_height(vs->ds))
|
if (y_position + h >= ds_get_height(vs->ds))
|
||||||
h = ds_get_height(vs->ds) - y_position;
|
h = ds_get_height(vs->ds) - y_position;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue