lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri,  7 Jul 2017 12:08:05 +0100
From:   Jose Abreu <Jose.Abreu@...opsys.com>
To:     linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Jose Abreu <Jose.Abreu@...opsys.com>,
        Carlos Palminha <CARLOS.PALMINHA@...opsys.com>,
        Hans Verkuil <hans.verkuil@...co.com>
Subject: [PATCH v7 2/6] [media] cec-notifier.h: Prevent build warnings using forward declaration

When CONFIC_CEC_NOTIFIER is not set and we only include cec-notifier.h
we can get build warnings like these ones:

"warning: ‘struct cec_notifier’ declared inside parameter list will
not be visible outside of this definition or declaration"

Prevent these warnings by using forward declaration of notifier
structure.

Signed-off-by: Jose Abreu <joabreu@...opsys.com>
Cc: Carlos Palminha <palminha@...opsys.com>
Cc: Hans Verkuil <hans.verkuil@...co.com>
---
 include/media/cec-notifier.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/media/cec-notifier.h b/include/media/cec-notifier.h
index 298f996..84f9376 100644
--- a/include/media/cec-notifier.h
+++ b/include/media/cec-notifier.h
@@ -21,14 +21,14 @@
 #ifndef LINUX_CEC_NOTIFIER_H
 #define LINUX_CEC_NOTIFIER_H
 
-#include <linux/types.h>
-#include <media/cec.h>
-
 struct device;
 struct edid;
 struct cec_adapter;
 struct cec_notifier;
 
+#include <linux/types.h>
+#include <media/cec.h>
+
 #if IS_REACHABLE(CONFIG_CEC_CORE) && IS_ENABLED(CONFIG_CEC_NOTIFIER)
 
 /**
-- 
1.9.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ