fix invalid modifier
fix implicit declaration(strncpy is not built-in function in recent gcc)
fix invalid modifier

In C99, the correct modifier of size_t is %zd.
Merge pull request #1 from cubicdaiya/issues/warnings

Merged. Thank you!