Fix some format specifier and mismatched type warnings

This fixes a few warnings that appear when building with GCC 4.8.1.

* cconv.c:83:2: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t'
* cconv.c:157:5: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'size_t'
* cconv.c:157:5: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t'
* cconv.c:165:2: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'size_t'
* cconv.c:165:2: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t'
* lock.c:113:2: warning: passing argument 2 of 'rewrite_lock_file' from incompatible pointer type
* lock.c:14:12: note: expected 'ssize_t *' but argument is of type 'long int *'