File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -274,6 +274,25 @@ sub generate_proto_h {
274
274
$arg =~ s /\s +$// ;
275
275
$arg =~ s /\s {2,}/ / g ;
276
276
277
+ die_at_end " :$func : $arg Use only one of NN, NULLOK, and NZ"
278
+ if 0 + $nn + $nz + $nullok > 1;
279
+
280
+ push ( @nonnull , $n ) if $nn ;
281
+
282
+ # A non-pointer shouldn't have a pointer-related modifier.
283
+ # But typedefs may be pointers without our knowing it, so
284
+ # we can't check for non-pointer issues. We can only
285
+ # check for the case where the argument is definitely a
286
+ # pointer.
287
+ if ($args_assert_line && $arg =~ / \* / ) {
288
+ if ($nn + $nullok == 0) {
289
+ warn " $func : $arg needs NN or NULLOK\n " ;
290
+ ++$unflagged_pointers ;
291
+ }
292
+
293
+ warn " $func : $arg should not have NZ\n " if $nz ;
294
+ }
295
+
277
296
push ( @nonnull , $n ) if $nn ;
278
297
279
298
# Make sure each arg has at least a type and a var name.
You can’t perform that action at this time.
0 commit comments