Re: [RFC PATCH linux-next] lib: zstd: fix duplicated inclusion

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

 




> On Oct 7, 2021, at 4:27 PM, kernel test robot <lkp@xxxxxxxxx> wrote:
> 
> Generated by: scripts/checkincludes.pl
> 
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Signed-off-by: kernel test robot <lkp@xxxxxxxxx>
> ---
> debug.h |    1 -
> 1 file changed, 1 deletion(-)
> 
> diff --git a/lib/zstd/common/debug.h b/lib/zstd/common/debug.h
> index 6dd88d1fbd02c..c8dc0b1890369 100644
> --- a/lib/zstd/common/debug.h
> +++ b/lib/zstd/common/debug.h
> @@ -65,7 +65,6 @@
> 
> #if (DEBUGLEVEL>=1)
> #  define ZSTD_DEPS_NEED_ASSERT
> -#  include "zstd_deps.h"
> #else
> #  ifndef assert   /* assert may be already defined, due to prior #include <assert.h> */
> #    define assert(condition) ((void)0)   /* disable assert (default) */

This is an intentional design choice of upstream zstd, and is correct.

Defining ZSTD_DEPS_NEED_ASSERT will cause “zstd_deps.h” to
provide a definition of assert(), even if it has already been included.

-Nick




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux