Fix warnings in knc.h with appropriate casting

Missing casts caused KNC compilation to emit a lot of warnings.  Warnings begone!