mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-24 17:15:07 +03:00
libcamera: event_dispatcher_poll: Remove struct keyword from for-range
When using -std=c++11, GCC versions 6.2 and 6.3 take objection to
declaring a struct type when using a range based iterator:
event_dispatcher_poll.cpp:231:13: error: types may not be defined
in a for-range-declaration [-Werror]
for (const struct pollfd &pfd : pollfds) {
^~~~~~
cc1plus: all warnings being treated as errors
Removing the keyword 'struct' ensures that the compiler does not try to
declare the type, and instead uses the type as already defined by the
relevant poll.h header.
This issue does not affect later compiler versions.
Reported-by: [autobuild.buildroot.net] Thomas Petazzoni <thomas.petazzoni@bootlin.com>
http://autobuild.buildroot.net/results/f6dd4c60c04892c8b1669e6000fce7edb2b6349e/
Fixes: 8356f8a6ab
("libcamera: Add a poll-based event dispatcher")
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
059ed93beb
commit
caf25dc5cf
1 changed files with 1 additions and 1 deletions
|
@ -241,7 +241,7 @@ void EventDispatcherPoll::processNotifiers(const std::vector<struct pollfd> &pol
|
|||
{ EventNotifier::Exception, POLLPRI },
|
||||
};
|
||||
|
||||
for (const struct pollfd &pfd : pollfds) {
|
||||
for (const pollfd &pfd : pollfds) {
|
||||
auto iter = notifiers_.find(pfd.fd);
|
||||
ASSERT(iter != notifiers_.end());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue