Fix -Wformat warnings with print_error() usage

Changed some %d to %ld or %lu.