read-cache.c: change type of "temp" in write_shared_index()