Skip to content

Commit

Permalink
New compile warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
neivv committed May 5, 2019
1 parent 562b793 commit d44b2be
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/ai_spending.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ pub unsafe fn can_satisfy_request(
return Err(RequestSatisfyError::Resources);
}
}
let mut reqs = match bw::upgrade_dat_requirements(upgrade_id) {
let reqs = match bw::upgrade_dat_requirements(upgrade_id) {
Some(s) => s,
None => return Err(RequestSatisfyError::NeedDatReqs),
};
Expand All @@ -231,7 +231,7 @@ pub unsafe fn can_satisfy_request(
if !wait_resources && !has_resources(game, player, &ai::tech_cost(tech_id)) {
return Err(RequestSatisfyError::Resources);
}
let mut reqs = match bw::tech_research_dat_requirements(tech_id) {
let reqs = match bw::tech_research_dat_requirements(tech_id) {
Some(s) => s,
None => return Err(RequestSatisfyError::NeedDatReqs),
};
Expand Down
2 changes: 1 addition & 1 deletion src/aiscript.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1726,7 +1726,7 @@ pub unsafe extern fn kills_command(script: *mut bw::AiScript) {
for unit_id in units.iter_flatten_groups() {
for p1 in player1.players() {
for p2 in player2.players() {
let mut kpos = globals::KCPos::new(p1, p2, unit_id.0);
let kpos = globals::KCPos::new(p1, p2, unit_id.0);
match write {
WriteModifier::Set => globals.kills_table.try_set(kpos, amount),
WriteModifier::Add => globals.kills_table.try_add(kpos, amount),
Expand Down
3 changes: 2 additions & 1 deletion src/gl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use std::mem;
use std::path::{Path, PathBuf};
use std::ptr::null_mut;
use std::rc::Rc;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
use std::time::SystemTime;

use glium::backend::{Context, Facade};
Expand Down Expand Up @@ -124,6 +124,7 @@ impl DrawState {

static OPENGL32_DLL: AtomicUsize = AtomicUsize::new(0);
static OLD_WINDOW_PROC: AtomicUsize = AtomicUsize::new(0);
static IS_SCR: AtomicBool = AtomicBool::new(false);

pub unsafe fn init_hooks(patcher: &mut whack::ActivePatcher) {
use self::bw_ext::*;
Expand Down
4 changes: 2 additions & 2 deletions src/idle_orders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,8 @@ pub unsafe extern fn idle_orders(script: *mut bw::AiScript) {
};
}
8 => {
let mut first = read.read_u16();
let mut second = read.read_u16();
let first = read.read_u16();
let second = read.read_u16();
if first > second {
rate.lower = second;
rate.upper = first;
Expand Down

0 comments on commit d44b2be

Please sign in to comment.