1 |
Some headerfiles are missing "#pragma once" or corresponding |
2 |
"#ifndef..." which may result in build error if multiple source files |
3 |
include the same file. |
4 |
|
5 |
Add "#pragma once" for concerned files. |
6 |
|
7 |
Signed-off-by: Marcus Folkesson <marcus.folkesson@×××××.com> |
8 |
--- |
9 |
src/mtd_probe/mtd_probe.h | 2 ++ |
10 |
src/scsi_id/scsi.h | 2 ++ |
11 |
src/scsi_id/scsi_id.h | 2 ++ |
12 |
src/shared/device-nodes.h | 2 ++ |
13 |
src/shared/fileio.h | 2 ++ |
14 |
src/shared/path-util.h | 2 ++ |
15 |
src/shared/siphash24.h | 3 +++ |
16 |
src/shared/socket-util.h | 2 ++ |
17 |
src/udev/udevadm-util.h | 2 ++ |
18 |
9 files changed, 19 insertions(+) |
19 |
|
20 |
diff --git a/src/mtd_probe/mtd_probe.h b/src/mtd_probe/mtd_probe.h |
21 |
index e048a0122..caea5c269 100644 |
22 |
--- a/src/mtd_probe/mtd_probe.h |
23 |
+++ b/src/mtd_probe/mtd_probe.h |
24 |
@@ -17,6 +17,8 @@ |
25 |
* Boston, MA 02110-1301 USA |
26 |
*/ |
27 |
|
28 |
+#pragma once |
29 |
+ |
30 |
#include <mtd/mtd-user.h> |
31 |
|
32 |
#include "macro.h" |
33 |
diff --git a/src/scsi_id/scsi.h b/src/scsi_id/scsi.h |
34 |
index c423cac57..3f99ae772 100644 |
35 |
--- a/src/scsi_id/scsi.h |
36 |
+++ b/src/scsi_id/scsi.h |
37 |
@@ -10,6 +10,8 @@ |
38 |
* Free Software Foundation version 2 of the License. |
39 |
*/ |
40 |
|
41 |
+#pragma once |
42 |
+ |
43 |
#include <scsi/scsi.h> |
44 |
|
45 |
struct scsi_ioctl_command { |
46 |
diff --git a/src/scsi_id/scsi_id.h b/src/scsi_id/scsi_id.h |
47 |
index 648b5ce42..141b116a8 100644 |
48 |
--- a/src/scsi_id/scsi_id.h |
49 |
+++ b/src/scsi_id/scsi_id.h |
50 |
@@ -15,6 +15,8 @@ |
51 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
52 |
*/ |
53 |
|
54 |
+#pragma once |
55 |
+ |
56 |
#define MAX_PATH_LEN 512 |
57 |
|
58 |
/* |
59 |
diff --git a/src/shared/device-nodes.h b/src/shared/device-nodes.h |
60 |
index d27ac0906..5df53e8c0 100644 |
61 |
--- a/src/shared/device-nodes.h |
62 |
+++ b/src/shared/device-nodes.h |
63 |
@@ -17,5 +17,7 @@ |
64 |
along with systemd; If not, see <http://www.gnu.org/licenses/>. |
65 |
***/ |
66 |
|
67 |
+#pragma once |
68 |
+ |
69 |
int encode_devnode_name(const char *str, char *str_enc, size_t len); |
70 |
int whitelisted_char_for_devnode(char c, const char *additional); |
71 |
diff --git a/src/shared/fileio.h b/src/shared/fileio.h |
72 |
index 641bf0230..7beed2eb8 100644 |
73 |
--- a/src/shared/fileio.h |
74 |
+++ b/src/shared/fileio.h |
75 |
@@ -17,6 +17,8 @@ |
76 |
along with systemd; If not, see <http://www.gnu.org/licenses/>. |
77 |
***/ |
78 |
|
79 |
+#pragma once |
80 |
+ |
81 |
#include <stddef.h> |
82 |
#include <stdio.h> |
83 |
|
84 |
diff --git a/src/shared/path-util.h b/src/shared/path-util.h |
85 |
index 0123c2609..1d15d4c0f 100644 |
86 |
--- a/src/shared/path-util.h |
87 |
+++ b/src/shared/path-util.h |
88 |
@@ -17,6 +17,8 @@ |
89 |
along with systemd; If not, see <http://www.gnu.org/licenses/>. |
90 |
***/ |
91 |
|
92 |
+#pragma once |
93 |
+ |
94 |
#include <stdbool.h> |
95 |
|
96 |
#include "macro.h" |
97 |
diff --git a/src/shared/siphash24.h b/src/shared/siphash24.h |
98 |
index 3253c179b..c2c19b437 100644 |
99 |
--- a/src/shared/siphash24.h |
100 |
+++ b/src/shared/siphash24.h |
101 |
@@ -1,3 +1,6 @@ |
102 |
+ |
103 |
+#pragma once |
104 |
+ |
105 |
#include <inttypes.h> |
106 |
#include <sys/types.h> |
107 |
|
108 |
diff --git a/src/shared/socket-util.h b/src/shared/socket-util.h |
109 |
index 2daa3279f..52b8dff66 100644 |
110 |
--- a/src/shared/socket-util.h |
111 |
+++ b/src/shared/socket-util.h |
112 |
@@ -17,6 +17,8 @@ |
113 |
along with systemd; If not, see <http://www.gnu.org/licenses/>. |
114 |
***/ |
115 |
|
116 |
+#pragma once |
117 |
+ |
118 |
#include <sys/socket.h> |
119 |
#include <netinet/in.h> |
120 |
#include <sys/un.h> |
121 |
diff --git a/src/udev/udevadm-util.h b/src/udev/udevadm-util.h |
122 |
index dba651fdd..37e4fe836 100644 |
123 |
--- a/src/udev/udevadm-util.h |
124 |
+++ b/src/udev/udevadm-util.h |
125 |
@@ -15,6 +15,8 @@ |
126 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
127 |
*/ |
128 |
|
129 |
+#pragma once |
130 |
+ |
131 |
#include "udev.h" |
132 |
|
133 |
struct udev_device *find_device(struct udev *udev, |
134 |
-- |
135 |
2.15.0 |