unix_time_to_mongo_time() appears to have its parameter and return type mixed up.
Fix a bunch of warnings from -Wall.

Several comparisons between signed and non-signed integers. Fixed by using size_t instead of int in a number of places.
One unused variable. Removed.
No return value from gridfs_mknod(). It doesn't do anything yet, so just return 0.