Infiniband Component: Build Warnings
Issue #112
resolved
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)
-
-
reporter Encounter the warning with GCC 8.1.0 & 10.3.0.
-
-
- changed status to resolved
- Log in to comment
@john.rodgers can you provide more information on what compiler and version you used?