Skip to content

Commit

Permalink
Fixed deprecated and casting build errors caught on recent compilers (#…
Browse files Browse the repository at this point in the history
…248)

* Specifying the C++ standard version to avoid deprecation/failures on build in case of new standard usage

* Fixed deprecated and casting build errors

* Removed spurious change

* Update memtier_benchmark.cpp

Co-authored-by: Yossi Gottlieb <[email protected]>

---------

Co-authored-by: Yossi Gottlieb <[email protected]>
  • Loading branch information
filipecosta90 and yossigo authored Jan 23, 2024
1 parent 20c013d commit 104ed9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion memtier_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1675,7 +1675,7 @@ int main(int argc, char *argv[])
run_stats average(&cfg);
average.aggregate_average(all_stats);
char average_header[50];
sprintf(average_header,"AGGREGATED AVERAGE RESULTS (%u runs)", cfg.run_count);
snprintf(average_header, sizeof(average_header) , "AGGREGATED AVERAGE RESULTS (%u runs)", cfg.run_count);
average.print(outfile, &cfg, average_header, jsonhandler);
} else {
all_stats.begin()->print(outfile, &cfg, "ALL STATS", jsonhandler);
Expand Down
2 changes: 1 addition & 1 deletion shard_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ void shard_connection::handle_event(short events)
if (!m_conns_manager->get_reqs_processed()) {
/* Set timer for request rate */
if (m_config->request_rate) {
struct timeval interval = { 0, (long int)m_config->request_interval_microsecond };
struct timeval interval = { 0, (int)m_config->request_interval_microsecond };
m_request_per_cur_interval = m_config->request_per_interval;
m_event_timer = event_new(m_event_base, -1, EV_PERSIST, cluster_client_timer_handler, (void *)this);
event_add(m_event_timer, &interval);
Expand Down

0 comments on commit 104ed9f

Please sign in to comment.