From 0e42d4ffe02dde696e4b26aa90093eb01fd0cceb Mon Sep 17 00:00:00 2001
From: Sascha Wildner <saw@online.de>
Date: Sun, 18 Feb 2018 04:05:07 +0100
Subject: [PATCH] WIP double assignment

---
 games/sail/dr_5.c                          | 1 -
 lib/libc_r/uthread/uthread_setschedparam.c | 1 -
 sys/boot/pc32/libi386/biosmem.c            | 1 -
 sys/bus/u4b/wlan/if_urtw.c                 | 2 --
 sys/dev/disk/ncr/ncr.c                     | 1 -
 sys/dev/drm/i915/dvo_ch7017.c              | 1 -
 sys/dev/drm/i915/intel_display.c           | 1 -
 sys/dev/raid/mrsas/mrsas_ioctl.c           | 1 -
 sys/dev/serial/si/si_drv.c                 | 1 -
 sys/dev/video/bktr/bktr_core.c             | 1 -
 tools/tools/net80211/w00t/ap/ap.c          | 1 -
 usr.sbin/rtadvd/config.c                   | 1 -
 12 files changed, 13 deletions(-)

diff --git a/games/sail/dr_5.c b/games/sail/dr_5.c
index 203f3d205a..13ebcee83d 100644
--- a/games/sail/dr_5.c
+++ b/games/sail/dr_5.c
@@ -77,7 +77,6 @@ mensent(struct ship *from, struct ship *to, int crew[3], struct ship **captured,
 		c1 = men/100 ? crew[0] : 0;
 		c2 = (men%100)/10 ? crew[1] : 0;
 		c3 = men/10 ? crew[2] : 0;
-		c3 = *captured == NULL ? crew[2] : *pc;
 	} else
 		c1 = c2 = c3 = 0;
 	return(c1 + c2 + c3);
diff --git a/lib/libc_r/uthread/uthread_setschedparam.c b/lib/libc_r/uthread/uthread_setschedparam.c
index 08eeabe66c..d3207bf197 100644
--- a/lib/libc_r/uthread/uthread_setschedparam.c
+++ b/lib/libc_r/uthread/uthread_setschedparam.c
@@ -75,7 +75,6 @@ _pthread_setschedparam(pthread_t pthread, int policy,
 			/* Set the thread base priority: */
 			pthread->base_priority &=
 			    (PTHREAD_SIGNAL_PRIORITY | PTHREAD_RT_PRIORITY);
-			pthread->base_priority = param->sched_priority;
 
 			/* Recalculate the active priority: */
 			pthread->active_priority = MAX(pthread->base_priority,
diff --git a/sys/boot/pc32/libi386/biosmem.c b/sys/boot/pc32/libi386/biosmem.c
index 178c044da2..26010afb3f 100644
--- a/sys/boot/pc32/libi386/biosmem.c
+++ b/sys/boot/pc32/libi386/biosmem.c
@@ -131,7 +131,6 @@ bios_getmem(void)
      * Hack it for now.
      */
     memtop = 0x100000 + bios_extmem;	/* XXX ignored */
-    memtop = 64 * 1024 * 1024;
     heapbase = memtop - LOADER_HEAP_SIZE;
 }    
 
diff --git a/sys/bus/u4b/wlan/if_urtw.c b/sys/bus/u4b/wlan/if_urtw.c
index 719de6c694..0d1234e961 100644
--- a/sys/bus/u4b/wlan/if_urtw.c
+++ b/sys/bus/u4b/wlan/if_urtw.c
@@ -1791,8 +1791,6 @@ urtw_tx_start(struct urtw_softc *sc, struct ieee80211_node *ni, struct mbuf *m0,
 		flags |= (urtw_rate2rtl(11) & 0xf) << URTW_TX_FLAG_RTSRATE_SHIFT;
 		tx->flag = htole32(flags);
 		tx->retry = 3;		/* CW minimum  */
-		tx->retry = 7 << 4;	/* CW maximum  */
-		tx->retry = URTW_TX_MAXRETRY << 8;	/* retry limitation  */
 		m_copydata(m0, 0, m0->m_pkthdr.len, (uint8_t *)(tx + 1));
 	}
 
diff --git a/sys/dev/disk/ncr/ncr.c b/sys/dev/disk/ncr/ncr.c
index f048167bdf..7133987127 100644
--- a/sys/dev/disk/ncr/ncr.c
+++ b/sys/dev/disk/ncr/ncr.c
@@ -4101,7 +4101,6 @@ ncr_action (struct cam_sim *sim, union ccb *ccb)
 		cp->sensecmd[0]			= 0x03;
 		cp->sensecmd[1]			= ccb->ccb_h.target_lun << 5;
 		cp->sensecmd[4]			= sizeof(struct scsi_sense_data);
-		cp->sensecmd[4]			= csio->sense_len;
 		/*
 		**	sense data
 		*/
diff --git a/sys/dev/drm/i915/dvo_ch7017.c b/sys/dev/drm/i915/dvo_ch7017.c
index b3c7c19920..5f2cc39392 100644
--- a/sys/dev/drm/i915/dvo_ch7017.c
+++ b/sys/dev/drm/i915/dvo_ch7017.c
@@ -283,7 +283,6 @@ static void ch7017_mode_set(struct intel_dvo_device *dvo,
 		lvds_pll_feedback_div = CH7017_LVDS_PLL_FEEDBACK_DEFAULT_RESERVED |
 			(2 << CH7017_LVDS_PLL_FEED_BACK_DIVIDER_SHIFT) |
 			(3 << CH7017_LVDS_PLL_FEED_FORWARD_DIVIDER_SHIFT);
-		lvds_pll_feedback_div = 35;
 		lvds_control_2 = (3 << CH7017_LOOP_FILTER_SHIFT) |
 			(0 << CH7017_PHASE_DETECTOR_SHIFT);
 		if (1) { /* XXX: dual channel panel detection.  Assume yes for now. */
diff --git a/sys/dev/drm/i915/intel_display.c b/sys/dev/drm/i915/intel_display.c
index 70c23ed210..a0390934b0 100644
--- a/sys/dev/drm/i915/intel_display.c
+++ b/sys/dev/drm/i915/intel_display.c
@@ -7105,7 +7105,6 @@ static void vlv_pllb_recal_opamp(struct drm_i915_private *dev_priv, enum i915_pi
 
 	reg_val = vlv_dpio_read(dev_priv, pipe, VLV_REF_DW13);
 	reg_val &= 0x8cffffff;
-	reg_val = 0x8c000000;
 	vlv_dpio_write(dev_priv, pipe, VLV_REF_DW13, reg_val);
 
 	reg_val = vlv_dpio_read(dev_priv, pipe, VLV_PLL_DW9(1));
diff --git a/sys/dev/raid/mrsas/mrsas_ioctl.c b/sys/dev/raid/mrsas/mrsas_ioctl.c
index f3caae4ce4..702f0f9a31 100644
--- a/sys/dev/raid/mrsas/mrsas_ioctl.c
+++ b/sys/dev/raid/mrsas/mrsas_ioctl.c
@@ -292,7 +292,6 @@ int mrsas_passthru( struct mrsas_softc *sc, void *arg )
         }
         sense_ptr = 
             (unsigned long *)((unsigned long)cmd->frame + user_ioc->sense_off);
-            sense_ptr = ioctl_sense_mem;
     }
 
     /*
diff --git a/sys/dev/serial/si/si_drv.c b/sys/dev/serial/si/si_drv.c
index 90c59ecfdd..fee292042d 100644
--- a/sys/dev/serial/si/si_drv.c
+++ b/sys/dev/serial/si/si_drv.c
@@ -1654,7 +1654,6 @@ si_intr(void *arg)
 			maddr = sc->sc_maddr;
 			((volatile struct si_reg *)maddr)->int_pending = 0;
 			*(maddr+SIPLIRQCLR) = 0x00;
-			*(maddr+SIPLIRQCLR) = 0x10;
 			break;
 		case SIPCI:
 			maddr = sc->sc_maddr;
diff --git a/sys/dev/video/bktr/bktr_core.c b/sys/dev/video/bktr/bktr_core.c
index b11020aaac..4c2ca951a1 100644
--- a/sys/dev/video/bktr/bktr_core.c
+++ b/sys/dev/video/bktr/bktr_core.c
@@ -2991,7 +2991,6 @@ yuvpack_prog( bktr_ptr_t bktr, char i_flag,
 	OUTB(bktr, BKTR_ADC, SYNC_LEVEL);
 
 	bktr->capcontrol =   1 << 6 | 1 << 4 | 1 << 2 | 3;
-	bktr->capcontrol = 3 << 2 |  3;
 
 	dma_prog = (uint32_t *) bktr->dma_prog;
 
diff --git a/tools/tools/net80211/w00t/ap/ap.c b/tools/tools/net80211/w00t/ap/ap.c
index 000fb0ed47..eea7538d48 100644
--- a/tools/tools/net80211/w00t/ap/ap.c
+++ b/tools/tools/net80211/w00t/ap/ap.c
@@ -389,7 +389,6 @@ void send_cts(struct params *p, char *mac)
 	wh->i_fc[0] |= IEEE80211_FC0_TYPE_CTL;
 	wh->i_fc[0] |= IEEE80211_FC0_SUBTYPE_CTS;
 	wh->i_dur[0] = 0x69;
-	wh->i_dur[0] = 0x00;
 	memcpy(wh->i_addr1, mac, 6);
 
 	send_frame(p, wh, 10);
diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c
index b39319a695..20c64438dd 100644
--- a/usr.sbin/rtadvd/config.c
+++ b/usr.sbin/rtadvd/config.c
@@ -1389,7 +1389,6 @@ make_packet(struct rainfo *rai)
 	 * XXX: the router preference field, which is a 2-bit field, should be
 	 * initialized before other fields.
 	 */
-	ra->nd_ra_flags_reserved = 0xff & rai->rai_rtpref;
 	ra->nd_ra_flags_reserved |=
 		rai->rai_managedflg ? ND_RA_FLAG_MANAGED : 0;
 	ra->nd_ra_flags_reserved |=
-- 
2.15.1

