Infiniband Component: Build Warnings

Issue #112 resolved
john.rodgers created an issue

Encountering the following compile time warnings when building PAPI with the infiniband component enabled:

components/infiniband/linux-infiniband.c: In function 'read_ib_counter_value':
components/infiniband/linux-infiniband.c:578:46: warning: 'snprintf' output may be truncated before the last format character [-Wformat-truncation=]
  snprintf(ev_file, sizeof(ev_file), "%s/%s",
                                     ^
components/infiniband/linux-infiniband.c:578:5: note: 'snprintf' output 2 or more bytes (assuming 4097) into a destination of size 4096
     snprintf(ev_file, sizeof(ev_file), "%s/%s",
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                   counters_path, iter->file_name);
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Comments (4)

  1. Log in to comment