linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c:275: dangling pointer ?
@ 2022-01-18  9:53 David Binderman
  2022-01-19 10:29 ` gregkh
  0 siblings, 1 reply; 3+ messages in thread
From: David Binderman @ 2022-01-18  9:53 UTC (permalink / raw)
  To: mchehab@kernel.org, sakari.ailus@linux.intel.com,
	gregkh@linuxfoundation.org, linux-media@vger.kernel.org,
	linux-staging@lists.linux.dev, Linux Kernel Mailing List

Hello there,

Recent gcc development versions say:

drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c:275:33: warning: storing the address of local variable ‘h’ in ‘*handle’ [-Wdangling-pointer=]

Source code is

      *handle = &h;

but h is a stack local variable, so exporting its address doesn't make any sense.

Regards

David Binderman


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-19 15:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-18  9:53 drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c:275: dangling pointer ? David Binderman
2022-01-19 10:29 ` gregkh
2022-01-19 15:37   ` David Binderman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).