[PATCH 2/3] drivers/common: add diagnostics macros to make code portable
Andre Muezerie
andremue at linux.microsoft.com
Fri Dec 27 20:43:55 CET 2024
On Fri, Dec 27, 2024 at 09:57:03AM -0800, Stephen Hemminger wrote:
> On Thu, 26 Dec 2024 17:33:15 -0800
> Andre Muezerie <andremue at linux.microsoft.com> wrote:
>
> > From: Andre Muezerie <andremue at linux.microsoft.com>
> > To: Bruce Richardson <bruce.richardson at intel.com>, Konstantin Ananyev <konstantin.v.ananyev at yandex.ru>, Jingjing Wu <jingjing.wu at intel.com>, Praveen Shetty <praveen.shetty at intel.com>
> > Cc: dev at dpdk.org, Andre Muezerie <andremue at linux.microsoft.com>
> > Subject: [PATCH 2/3] drivers/common: add diagnostics macros to make code portable
> > Date: Thu, 26 Dec 2024 17:33:15 -0800
> > X-Mailer: git-send-email 1.8.3.1
> >
> > It was a common pattern to have "GCC diagnostic ignored" pragmas
> > sprinkled over the code and only activate these pragmas for certain
> > compilers (gcc and clang). Clang supports GCC’s pragma for
> > compatibility with existing source code, so #pragma GCC diagnostic
> > and #pragma clang diagnostic are synonyms for Clang
> > (https://clang.llvm.org/docs/UsersManual.html).
>
> As much as possible, these should be fixed. Disabling warnings hides too many
> pre-existing bugs.
I'll take a closer look at these warnings and see what I can get fixed.
My main goal here was to get the code to compile with MSVC (without
disabling additional warnings), but I agree that it's not great to
see these warnings getting disabled in so many places.
More information about the dev
mailing list