FreeBSD/contrib/gcc/c-common.c
/* Check the argument list of a function call for null in argument slots
   that are marked as requiring a non-null pointer argument.  */
Check the argument list of a function call for null in argument slots
that are marked as requiring a non-null pointer argument.
Check the argument list of a function call for null in argument slots that are marked as requiring a non - null pointer argument .
static void
check_function_nonnull (tree attrs, tree params)
{
  tree a, args, param;
  int param_num;
  for (a = attrs; a; a = TREE_CHAIN (a))
    {
      if (is_attribute_p ("nonnull", TREE_PURPOSE (a)))
	{
	  args = TREE_VALUE (a);
	  for (param = params, param_num = 1; ;
	       param_num++, param = TREE_CHAIN (param))
	    {
	      if (!param)
	break;
	      if (!args || nonnull_check_p (args, param_num))
	check_function_arguments_recurse (check_nonnull_arg, NULL,
					  TREE_VALUE (param),
					  param_num);
	    }
	}
    }
}
static void check_function_nonnull ( tree attrs , tree params ) { tree a , args , param ; int param_num ; for ( a = attrs ; a ; a = TREE_CHAIN ( a ) ) { if ( is_attribute_p ( " " , TREE_PURPOSE ( a ) ) ) { args = TREE_VALUE ( a ) ; for ( param = params , param_num = 1 ; ; param_num ++ , param = TREE_CHAIN ( param ) ) { if ( ! param ) break ; if ( ! args || nonnull_check_p ( args , param_num ) ) check_function_arguments_recurse ( check_nonnull_arg , NULL , TREE_VALUE ( param ) , param_num ) ; } } } }
Check the argument list of a function call for null in argument slots
that are marked as requiring a non-null pointer argument.
Check the argument list of a function call for null in argument slots that are marked as requiring a non - null pointer argument .
/* Walk the argument list.  If we encounter an argument number we
	     should check for non-null, do it.  If the attribute has no args,
	     then every pointer argument is checked (in which case the check
	     for pointer type is done in check_nonnull_arg).  */