Fix remaining warnings in xori build
mikemadden42 opened this issue · comments
#39 fixes the majority of the build warnings in xori. There are a couple outstanding warnings that need further investigation. I see these warnings when building on macos 10.15.3, ubuntu 19.10, and windows server 2019.
Compiling xori v0.0.1 (/Users/hulk/src/endgameinc/xori)
warning: use of deprecated item 'std::mem::uninitialized': use `mem::MaybeUninit` instead
--> src/analysis/formats/pe.rs:523:3
|
523 | / do_parse!(input,
524 | | major_linker_version: le_u8 >>
525 | | minor_linker_version: le_u8 >>
526 | | size_of_code: le_u32 >>
... |
584 | | }))
585 | | )
| |___^
|
= note: `#[warn(deprecated)]` on by default
= note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
warning: use of deprecated item 'std::mem::uninitialized': use `mem::MaybeUninit` instead
--> src/analysis/formats/pe.rs:589:3
|
589 | / do_parse!(input,
590 | | major_linker_version: le_u8 >>
591 | | minor_linker_version: le_u8 >>
592 | | size_of_code: le_u32 >>
... |
653 | | )
654 | | )
| |___^
|
= note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
I believe nom (the parsing library that has all these macros) has fully refactored itself at least once since I wrote this. The easy way to fix it is to probably just follow the warning, but the bigger thing might be looking into the latest nom.
@rseymour This issue does look related to nom and do_parse
. I've tried different versions of nom up to version 4.2.3, and the warning persists.
Unfortunately nom 5.0.0 removed count_fixed
.
rust-bakery/nom#1007
https://github.com/Geal/nom/blob/master/CHANGELOG.md#500---2019-06-24
count_fixed is used in xori in a couple spots.
https://github.com/endgameinc/xori/blob/master/src/analysis/formats/pe.rs#L552
https://github.com/endgameinc/xori/blob/master/src/analysis/formats/pe.rs#L619
This PR fixes the warnings.
#44