bug-datamash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/3] add missing include


From: Tim Rice
Subject: Re: [PATCH 1/3] add missing include
Date: Sun, 26 Jan 2025 22:58:56 +0000

Hey Georg,

well, this patch series isn't about errors, but about issues below the
error threshold.

We are lucky that there are some compilers that warn about them,
such that they are easier to find.

The motivation for adding that include is to make sure that we get a
compile error in case a future refactoring of a global function defined
in that translation unit goes wrong, i.e. when the signature of the
function definition is changed without updating the declaration in the
header - or vice versa.

Thus, one could classify this change as a preventative measure,
something that increases the robustness of the code or defense in depth.

An kind of indirect way to find such missing includes is to compile with
`-Wmissing-prototypes`.

However, even if gcc wouldn't provide any warning switch for it,
I would still want to fix it.

Cool, cool, I get it. Thanks for the extra explanation! I'll add a summary of 
this to the commit message before pushing it up.

~ Tim



reply via email to

[Prev in Thread] Current Thread [Next in Thread]