Blame gnulib-tests/arg-nonnull.h

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