Compile under Windows without warnings.

* Insert explicit casts.
* Get rid "comparing `signed` and `unsigned`" warnings.
* Convert `trex_match()` to `bool` without "performance" warnings.