Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package opae for openSUSE:Factory checked in at 2021-06-28 15:33:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/opae (Old) and /work/SRC/openSUSE:Factory/.opae.new.2625 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "opae" Mon Jun 28 15:33:44 2021 rev:9 rq:902744 version:2.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/opae/opae.changes 2021-04-27 21:35:48.988097792 +0200 +++ /work/SRC/openSUSE:Factory/.opae.new.2625/opae.changes 2021-06-28 15:34:15.103231775 +0200 @@ -1,0 +2,7 @@ +Fri Jun 4 09:10:41 UTC 2021 - Nicolas Morey-Chaisemartin <[email protected]> + +- Add patches to fix compilation with GCC11 + - opae-libs-fix-macro-indentation.patch + - opae-libs-xfpga-fix-strnlen-argument.patch + +------------------------------------------------------------------- New: ---- opae-libs-fix-macro-indentation.patch opae-libs-xfpga-fix-strnlen-argument.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ opae.spec ++++++ --- /var/tmp/diff_new_pack.Rtt9c8/_old 2021-06-28 15:34:15.659232458 +0200 +++ /var/tmp/diff_new_pack.Rtt9c8/_new 2021-06-28 15:34:15.667232467 +0200 @@ -39,6 +39,8 @@ Patch0: opae-missing-shebang.patch Patch1: opae-fix-linking-issue.patch Patch2: opae-support-OBS-build.patch +Patch3: opae-libs-fix-macro-indentation.patch +Patch4: opae-libs-xfpga-fix-strnlen-argument.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: boost-devel BuildRequires: cli11-devel @@ -145,6 +147,8 @@ %patch0 %patch1 %patch2 +%patch3 +%patch4 %build export RPM_OPT_FLAGS ++++++ opae-libs-fix-macro-indentation.patch ++++++ commit ad77bee0dd37435fc823e97ecb7ab5873fa04140 Author: Nicolas Morey-Chaisemartin <[email protected]> Date: Fri Jun 4 08:59:33 2021 +0200 opae-libs: fix macro indentation Fixes compilation issue with newer GCC versions: /home/abuild/rpmbuild/BUILD/opae-2.0.01.0.776b2b2718f7/opae-libs/include/opae/log.h:51:1: error: this 'if' clause does not guard... [-Werror=misleading-indentation] 51 | if (p > file) \ | ^~ /home/abuild/rpmbuild/BUILD/opae-2.0.01.0.776b2b2718f7/opae-libs/include/opae/log.h:69:9: note: in expansion of macro '__SHORT_FILE__' 69 | __SHORT_FILE__, __LINE__, __func__, ##__VA_ARGS__) | ^~~~~~~~~~~~~~ /home/abuild/rpmbuild/BUILD/opae-2.0.01.0.776b2b2718f7/opae-libs/libopae-c/opae_int.h:85:25: note: in expansion of macro 'OPAE_ERR' 85 | OPAE_ERR("pthread_mutex_unlock failed: %s", \ | ^~~~~~~~ /home/abuild/rpmbuild/BUILD/opae-2.0.01.0.776b2b2718f7/opae-libs/libopae-c/pluginmgr.c:802:9: note: in expansion of macro 'opae_mutex_unlock' 802 | opae_mutex_unlock(res, &adapter_list_lock); | ^~~~~~~~~~~~~~~~~ /home/abuild/rpmbuild/BUILD/opae-2.0.01.0.776b2b2718f7/opae-libs/include/opae/log.h:53:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' 53 | p; \ | ^ Signed-off-by: Nicolas Morey-Chaisemartin <[email protected]> diff --git opae-libs/include/opae/log.h opae-libs/include/opae/log.h index f913b48f0f8a..96b3742f5482 100644 --- opae-libs/include/opae/log.h +++ opae-libs/include/opae/log.h @@ -40,17 +40,17 @@ #ifdef __SHORT_FILE__ #undef __SHORT_FILE__ #endif // __SHORT_FILE__ -#define __SHORT_FILE__ \ - ({ \ - const char *file = __FILE__; \ - const char *p = file; \ -while (*p) \ - ++p; \ -while ((p > file) && ('/' != *p) && ('\\' != *p)) \ - --p; \ -if (p > file) \ - ++p; \ - p; \ +#define __SHORT_FILE__ \ + ({ \ + const char *file = __FILE__; \ + const char *p = file; \ + while (*p) \ + ++p; \ + while ((p > file) && ('/' != *p) && ('\\' != *p)) \ + --p; \ + if (p > file) \ + ++p; \ + p; \ }) #ifdef OPAE_MSG ++++++ opae-libs-xfpga-fix-strnlen-argument.patch ++++++ commit a7c299dc11ffb0407e491b8aa743d7f9c60712e5 Author: Nicolas Morey-Chaisemartin <[email protected]> Date: Fri Jun 4 09:21:13 2021 +0200 opae-libs: xfpga: fix strnlen argument Fixes GCC11 build error: /home/abuild/rpmbuild/BUILD/opae-2.0.01.0.776b2b2718f7/opae-libs/plugins/xfpga/metrics/bmc/bmc.c: In function 'bmcGetLastPowerdownCause': /home/abuild/rpmbuild/BUILD/opae-2.0.01.0.776b2b2718f7/opae-libs/plugins/xfpga/metrics/bmc/bmc.c:573:18: error: 'strnlen' specified bound 256 exceeds source size 40 [-Werror=stringop-overread] 573 | *cause = strndup((const char *)tmp->message, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 574 | strnlen((const char *)tmp->message, SYSFS_PATH_MAX)); Signed-off-by: Nicolas Morey-Chaisemartin <[email protected]> diff --git opae-libs/plugins/xfpga/metrics/bmc/bmc.c opae-libs/plugins/xfpga/metrics/bmc/bmc.c index 9951eb83ac0d..9d19e18a2f8d 100644 --- opae-libs/plugins/xfpga/metrics/bmc/bmc.c +++ opae-libs/plugins/xfpga/metrics/bmc/bmc.c @@ -45,6 +45,7 @@ #include <glob.h> + #define NULL_CHECK(x) \ do { \ if (NULL == (x)) { \ @@ -571,7 +572,7 @@ fpga_result bmcGetLastPowerdownCause(fpga_token token, char **cause) } *cause = strndup((const char *)tmp->message, - strnlen((const char *)tmp->message, SYSFS_PATH_MAX)); + strnlen((const char *)tmp->message, 40)); out: if (tmp) {
