[dpdk-dev] [PATCH] Working Towards Making DPDK Compile with Additional Warning Flags

Devyn Johnson devyn.johnson at banduracyber.com
Tue Nov 5 22:04:16 CET 2019


On Tue, Nov 5, 2019 at 1:36 PM David Marchand <david.marchand at redhat.com>
wrote:

> Hello,
>
> On Tue, Nov 5, 2019 at 7:17 PM <devyn.johnson at banduracyber.com> wrote:
> >
> > From: Devyn Collier Johnson <Devyn.Johnson at BanduraCyber.com>
> >
> > Signed-off-by: Devyn Collier Johnson <Devyn.Johnson at BanduraCyber.com>
> > ---
> >  lib/librte_cryptodev/rte_cryptodev.c        |  4 ++--
> >  lib/librte_eal/common/eal_common_cpuflags.c |  4 ++--
> >  lib/librte_eal/common/eal_common_errno.c    |  2 +-
> >  lib/librte_eal/common/eal_common_hexdump.c  |  4 ++--
> >  lib/librte_eal/common/eal_common_lcore.c    | 10 +++++-----
> >  lib/librte_eal/common/eal_common_log.c      | 10 +++++-----
> >  lib/librte_eal/common/eal_common_memalloc.c |  8 ++++----
> >  lib/librte_eal/common/eal_common_memory.c   |  2 +-
> >  lib/librte_eal/common/eal_common_proc.c     |  2 +-
> >  lib/librte_eal/common/eal_common_tailqs.c   |  2 +-
> >  lib/librte_eal/common/eal_memalloc.h        |  8 ++++----
> >  lib/librte_eal/common/eal_private.h         |  2 +-
> >  lib/librte_eal/common/include/rte_bitmap.h  | 20 ++++++++++----------
> >  lib/librte_eal/common/include/rte_common.h  |  2 +-
> >  lib/librte_eal/common/include/rte_errno.h   |  2 +-
> >  lib/librte_eal/common/include/rte_hexdump.h |  2 +-
> >  lib/librte_eal/common/include/rte_lcore.h   | 10 +++++-----
> >  lib/librte_eal/common/include/rte_log.h     |  8 ++++----
> >  lib/librte_eal/common/malloc_elem.c         |  4 ++--
> >  lib/librte_eal/linux/eal/eal.c              |  2 +-
> >  lib/librte_ethdev/rte_class_eth.c           |  2 +-
> >  lib/librte_ethdev/rte_mtr.c                 |  2 +-
> >  lib/librte_ethdev/rte_tm.c                  |  2 +-
> >  lib/librte_mbuf/rte_mbuf.c                  |  4 ++--
> >  lib/librte_mbuf/rte_mbuf_dyn.c              |  4 ++--
> >  lib/librte_mempool/rte_mempool.c            |  2 +-
> >  lib/librte_ring/rte_ring.c                  |  2 +-
> >  lib/librte_timer/rte_timer.c                | 20 ++++++++++----------
> >  28 files changed, 73 insertions(+), 73 deletions(-)
>
> Thanks for the patch.
>
> It is missing a commitlog describing the problem that you faced, and
> explaining how this patch fixes this problem.
> It touches a lot of different parts of the dpdk, which will make it
> harder to review and (if applicable) harder to backport in stable
> branches.
>
> Before submitting new patches, please take the time to read our
> contributing guide that you can find here:
> http://doc.dpdk.org/guides/contributing/patches.html
>
>
> --
> David Marchand
>
>
These changes are merely one step toward making DPDK compile successfully
when using the compiler flags `-Werror -Wall -Wextra -Wpedantic
-Wdangling-else -Wdate-time -Wdisabled-optimization -Winit-self
-Winvalid-pch -Woverlength-strings -Wpointer-arith -Wredundant-decls
-Wshift-negative-value -Wstack-protector -Wuninitialized -Wunused-parameter
-Wunused-result`. Doing so can frequently reduce the probability of bugs
that are difficult to reproduce as well as point out situations the
developer did not intend to create. Currently, DPDK will not compile with
such flags set.

-- 
Thanks,
Devyn Collier Johnson
Devyn.Johnson at BanduraCyber.com


More information about the dev mailing list