Blame gnulib-tests/arg-nonnull.h

Packit 33f14e
/* A C macro for declaring that specific arguments must not be NULL.
Packit 33f14e
   Copyright (C) 2009-2017 Free Software Foundation, Inc.
Packit 33f14e
Packit 33f14e
   This program is free software: you can redistribute it and/or modify it
Packit 33f14e
   under the terms of the GNU General Public License as published
Packit 33f14e
   by the Free Software Foundation; either version 3 of the License, or
Packit 33f14e
   (at your option) any later version.
Packit 33f14e
Packit 33f14e
   This program is distributed in the hope that it will be useful,
Packit 33f14e
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 33f14e
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 33f14e
   General Public License for more details.
Packit 33f14e
Packit 33f14e
   You should have received a copy of the GNU General Public License
Packit 33f14e
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
Packit 33f14e
Packit 33f14e
/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
Packit 33f14e
   that the values passed as arguments n, ..., m must be non-NULL pointers.
Packit 33f14e
   n = 1 stands for the first argument, n = 2 for the second argument etc.  */
Packit 33f14e
#ifndef _GL_ARG_NONNULL
Packit 33f14e
# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
Packit 33f14e
#  define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
Packit 33f14e
# else
Packit 33f14e
#  define _GL_ARG_NONNULL(params)
Packit 33f14e
# endif
Packit 33f14e
#endif