lkml.org 
[lkml]   [2023]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 05/45] drm/connector: Check drm_connector_init pointers arguments
On Tue, 28 Nov 2023 15:49:08 +0200
Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:

> Should we perhaps start to use the (arguably hideous)
> - void f(struct foo *bar)
> + void f(struct foo bar[static 1])
> syntax to tell the compiler we don't accept NULL pointers?
>
> Hmm. Apparently that has the same problem as using any
> other kind of array syntax in the prototype. That is,
> the compiler demands to know the definition of 'struct foo'
> even though we're passing in effectively a pointer. Sigh.


__attribute__((nonnull)) ?


Thanks,
pq
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-11-29 11:14    [W:0.114 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site