Loading CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ project(kinetic_cpp_client_examples CXX C) find_package (Threads) set(CMAKE_CXX_FLAGS "-g --std=c++11 -Wall -Wextra -Werror -Wno-unused-parameter -DGTEST_USE_OWN_TR1_TUPLE=1") set(CMAKE_CXX_FLAGS "-g --std=c++11 -Wall -Wextra -Werror -Wno-unused-parameter -DGTEST_USE_OWN_TR1_TUPLE=1 -D__STDC_FORMAT_MACROS") set(GENERATED_SOURCES_PATH ${kinetic_cpp_client_SOURCE_DIR}/src/main/generated) Loading src/kineticstat.cc +0 −1 Original line number Diff line number Diff line // This simple utility can periodically print various stats about a drive #define __STDC_FORMAT_MACROS #include <inttypes.h> #include <stdio.h> Loading src/read_file_nonblocking.cc +2 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ #include <glog/logging.h> #include <sys/fcntl.h> #include <sys/mman.h> #include <inttypes.h> #include "protobufutil/message_stream.h" Loading Loading @@ -124,7 +125,7 @@ int main(int argc, char* argv[]) { block_length = file_size - i + 1; } sprintf(key_buffer, "%s-%10llu", kinetic_key, i); sprintf(key_buffer, "%s-%10" PRId64, kinetic_key, (int64_t)i); remaining++; TestCallback* callback = new TestCallback(output_buffer + i, block_length, &remaining); std::string key(key_buffer); Loading src/write_file_nonblocking.cc +4 −2 Original line number Diff line number Diff line // This writes the given file to a drive as a series of 1MB chunks and a metadata key // This writes the given file to a drive as a series of 1MB chunks and a metadata // key using the nonblocking API #include <stdio.h> #include <sys/fcntl.h> #include <sys/mman.h> #include <inttypes.h> #include "protobufutil/message_stream.h" Loading Loading @@ -84,7 +86,7 @@ int main(int argc, char* argv[]) { value_size = inputfile_stat.st_size - i + 1; } sprintf(key_buffer, "%s-%10llu", kinetic_key, i); sprintf(key_buffer, "%s-%10" PRId64, kinetic_key, (int64_t)i); std::string key(key_buffer); std::string value(inputfile_data + i, value_size); Loading Loading
CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ project(kinetic_cpp_client_examples CXX C) find_package (Threads) set(CMAKE_CXX_FLAGS "-g --std=c++11 -Wall -Wextra -Werror -Wno-unused-parameter -DGTEST_USE_OWN_TR1_TUPLE=1") set(CMAKE_CXX_FLAGS "-g --std=c++11 -Wall -Wextra -Werror -Wno-unused-parameter -DGTEST_USE_OWN_TR1_TUPLE=1 -D__STDC_FORMAT_MACROS") set(GENERATED_SOURCES_PATH ${kinetic_cpp_client_SOURCE_DIR}/src/main/generated) Loading
src/kineticstat.cc +0 −1 Original line number Diff line number Diff line // This simple utility can periodically print various stats about a drive #define __STDC_FORMAT_MACROS #include <inttypes.h> #include <stdio.h> Loading
src/read_file_nonblocking.cc +2 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ #include <glog/logging.h> #include <sys/fcntl.h> #include <sys/mman.h> #include <inttypes.h> #include "protobufutil/message_stream.h" Loading Loading @@ -124,7 +125,7 @@ int main(int argc, char* argv[]) { block_length = file_size - i + 1; } sprintf(key_buffer, "%s-%10llu", kinetic_key, i); sprintf(key_buffer, "%s-%10" PRId64, kinetic_key, (int64_t)i); remaining++; TestCallback* callback = new TestCallback(output_buffer + i, block_length, &remaining); std::string key(key_buffer); Loading
src/write_file_nonblocking.cc +4 −2 Original line number Diff line number Diff line // This writes the given file to a drive as a series of 1MB chunks and a metadata key // This writes the given file to a drive as a series of 1MB chunks and a metadata // key using the nonblocking API #include <stdio.h> #include <sys/fcntl.h> #include <sys/mman.h> #include <inttypes.h> #include "protobufutil/message_stream.h" Loading Loading @@ -84,7 +86,7 @@ int main(int argc, char* argv[]) { value_size = inputfile_stat.st_size - i + 1; } sprintf(key_buffer, "%s-%10llu", kinetic_key, i); sprintf(key_buffer, "%s-%10" PRId64, kinetic_key, (int64_t)i); std::string key(key_buffer); std::string value(inputfile_data + i, value_size); Loading