I think this patch has to be spit on several patches. Having patch which correct unrelated things is strange and make it hard to merge/cherry-pick.
Maxim. On 06/02/17 10:39, Dmitry Eremin-Solenikov wrote: > On 01.06.2017 22:05, Brian Brooks wrote: >> Signed-off-by: Brian Brooks <brian.bro...@arm.com> >> Reviewed-by: Ola Liljedahl <ola.liljed...@arm.com> >> Reviewed-by: Honnappa Nagarahalli <honnappa.nagaraha...@arm.com> >> --- >> configure.ac | 5 +++++ >> platform/linux-generic/m4/configure.m4 | 4 ++++ >> platform/linux-generic/pktio/ipc.c | 6 ++++-- >> platform/linux-generic/pktio/sysfs.c | 2 +- >> test/common_plat/validation/api/pktio/pktio.c | 4 +++- >> 5 files changed, 17 insertions(+), 4 deletions(-) >> >> diff --git a/configure.ac b/configure.ac >> index 7569ebe0..5eabe4d4 100644 >> --- a/configure.ac >> +++ b/configure.ac >> @@ -300,6 +300,11 @@ ODP_CFLAGS="$ODP_CFLAGS -Wmissing-declarations >> -Wold-style-definition -Wpointer- >> ODP_CFLAGS="$ODP_CFLAGS -Wcast-align -Wnested-externs -Wcast-qual >> -Wformat-nonliteral" >> ODP_CFLAGS="$ODP_CFLAGS -Wformat-security -Wundef -Wwrite-strings" >> ODP_CFLAGS="$ODP_CFLAGS -std=c99" >> + >> +if test "${CC}" == "gcc" -a ${CC_VERSION_MAJOR} -ge 7; then >> + ODP_CFLAGS="$ODP_CFLAGS -Wimplicit-fallthrough=0" >> +fi >> + > > Shouldn't Wimplicit-fallthrough=2 be enough? Where are you hitting the > warning? > >> # Extra flags for example to suppress certain warning types >> ODP_CFLAGS="$ODP_CFLAGS $ODP_CFLAGS_EXTRA" >> >> diff --git a/platform/linux-generic/m4/configure.m4 >> b/platform/linux-generic/m4/configure.m4 >> index a2a25408..3e2978b5 100644 >> --- a/platform/linux-generic/m4/configure.m4 >> +++ b/platform/linux-generic/m4/configure.m4 >> @@ -28,6 +28,10 @@ AC_LINK_IFELSE( >> echo "Use newer version. For gcc > 4.7.0" >> exit -1) >> >> +if test "${CC}" == "gcc" -a ${CC_VERSION_MAJOR} -ge 7; then >> + AM_LDFLAGS="$AM_LDFLAGS -latomic" >> +fi >> + > > This should be replaced with proper AC_CHECK_LIB or AC_SEARCH_LIBS > >> m4_include([platform/linux-generic/m4/odp_pthread.m4]) >> m4_include([platform/linux-generic/m4/odp_openssl.m4]) >> m4_include([platform/linux-generic/m4/odp_pcap.m4]) >> diff --git a/platform/linux-generic/pktio/ipc.c >> b/platform/linux-generic/pktio/ipc.c >> index 06175e5a..29c3a546 100644 >> --- a/platform/linux-generic/pktio/ipc.c >> +++ b/platform/linux-generic/pktio/ipc.c >> @@ -694,8 +694,10 @@ static int ipc_close(pktio_entry_t *pktio_entry) >> >> if (sscanf(dev, "ipc:%d:%s", &pid, tail) == 2) >> snprintf(name, sizeof(name), "ipc:%s", tail); >> - else >> - snprintf(name, sizeof(name), "%s", dev); >> + else { >> + strncpy(name, dev, sizeof(name)); >> + name[sizeof(name) - 1] = '\0'; >> + } > > Why? > >> >> /* unlink this pktio info for both master and slave */ >> odp_shm_free(pktio_entry->s.ipc.pinfo_shm); > >