RESOLVED FIXED 172595
Clang warns about (intended) returning pointer to stack location in WTF/wtf/ThreadingPthreads.cpp
https://bugs.webkit.org/show_bug.cgi?id=172595
Summary Clang warns about (intended) returning pointer to stack location in WTF/wtf/T...
Adrian Perez
Reported 2017-05-25 09:17:14 PDT
When building with Clang (at least on GNU/Linux), the warning is: ../../Source/WTF/wtf/ThreadingPthreads.cpp:105:13: warning: address of stack memory associated with local variable 'stackLocation' returned [-Wreturn-stack-address] return &stackLocation; ^~~~~~~~~~~~~ 1 warning generated. It is possible to use a #pragma to silence this warning (as done for GCC). I'm making a patch to silence this warning, because in here returning a pointer to the stack is precisely what's intended.
Attachments
Patch (1.74 KB, patch)
2017-05-25 09:20 PDT, Adrian Perez
no flags
Adrian Perez
Comment 1 2017-05-25 09:20:13 PDT
Mark Lam
Comment 2 2017-05-25 09:37:20 PDT
Comment on attachment 311226 [details] Patch r=me
WebKit Commit Bot
Comment 3 2017-05-25 10:07:19 PDT
Comment on attachment 311226 [details] Patch Clearing flags on attachment: 311226 Committed r217431: <http://trac.webkit.org/changeset/217431>
WebKit Commit Bot
Comment 4 2017-05-25 10:07:20 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 5 2017-05-30 20:21:38 PDT
Note You need to log in before you can comment on or make changes to this bug.