When trying to compile the project from the source in master, the default Cray compiler enables some warnings that triggered the following errors:
In file included from /[redacted]/oprofile/libutil++/child_reader.cpp:23: /[redacted]/oprofile/libutil++/child_reader.h:96:10: error: private field 'pos2' is not used [-Werror,-Wunused-private-field] ssize_t pos2; ^
/[redacted]/oprofile/libregex/op_regex.cpp:210:42: error: adding 'char' to a string does not append to the string [-Werror,-Wstring-plus-int] throw bad_regex("expect group index: " + idx); \~~~~~~~~~~~~~~~~~~~~~~~^~~~~ /[redacted]/oprofile/libregex/op_regex.cpp:210:42: note: use array indexing to silence this warning throw bad_regex("expect group index: " + idx); ^ & [ ] /[redacted]/oprofile/libregex/op_regex.cpp:212:43: error: adding 'char' to a string does not append to the string [-Werror,-Wstring-plus-int] throw bad_regex("illegal group index :" + idx); \~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ /[redacted]/oprofile/libregex/op_regex.cpp:212:43: note: use array indexing to silence this warning throw bad_regex("illegal group index :" + idx); ^ & [ ]
In file included from /home/users/cfoyer/oprofile/libpp/arrange_profiles.cpp:23: /home/users/cfoyer/oprofile/libpp/arrange_profiles.h:214:1: error: 'inverted_profile' defined as a struct here but previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Werror,-Wmismatched-tags] struct inverted_profile { ^ /home/users/cfoyer/oprofile/libpp/image_errors.h:17:1: note: did you mean struct here? class inverted_profile; ^~~~~ struct In file included from /home/users/cfoyer/oprofile/libpp/arrange_profiles.cpp:24: /home/users/cfoyer/oprofile/libpp/format_output.h:27:1: error: class 'sample_entry' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Werror,-Wmismatched-tags] class sample_entry; ^ /home/users/cfoyer/oprofile/libpp/symbol.h:51:8: note: previous use is here struct sample_entry { ^ /home/users/cfoyer/oprofile/libpp/format_output.h:27:1: note: did you mean struct here? class sample_entry; ^~~~~ struct
/home/users/cfoyer/oprofile/libperf_events/operf_stats.cpp:113:25: error: comparison of integers of different signs: 'unsigned long' and 'int' [-Werror,-Wsign-compare] if (total_lost_samples > (int)(OPERF_WARN_LOST_SAMPLES_THRESHOLD \~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Most of the reported warning are fairly straightforward to resolve.
I forgot to remove the path on the last two code excerps. Would it be possible for an admin to edit the post to remove it for me please?