Fix some unreferenced local variable and fix warning  warning C4018: '<' : signed/unsigned mismatch.
Merge pull request #11456 from armano2/mmaps_rw2

Fix some unreferenced local variable and fix warning  warning C4018: '<'...