Fixed compiler warning in critical sections.
Merge pull request #39 from nuft/criticalsection-unused-var-fix

Unused variable warning in critical section