Commit 301d299
committed
Gate FAN_FS_ERROR helpers by header support
Older kernel headers can leave FAPOLICYD_HAVE_FANOTIFY_FS_ERROR disabled while still compiling daemon/fanotify-fs-error.c. In that configuration, record_fs_error_event() and escape_path_for_log() were defined even though their only callers were inside FAN_FS_ERROR-only code paths, which produced -Wunused-function warnings on builds such as RHEL 8.
Guard the private FAN_FS_ERROR helper prototypes, state, and implementations with the existing FAPOLICYD_HAVE_FANOTIFY_FS_ERROR check, and remove the unused old-header parse stub. The public fallback entry points remain available so unsupported-header builds keep the same no-op behavior.1 parent 973f241 commit 301d299
1 file changed
Lines changed: 10 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
94 | 97 | | |
95 | 98 | | |
| 99 | + | |
96 | 100 | | |
97 | 101 | | |
| 102 | + | |
98 | 103 | | |
99 | 104 | | |
100 | 105 | | |
| |||
103 | 108 | | |
104 | 109 | | |
105 | 110 | | |
| 111 | + | |
106 | 112 | | |
107 | 113 | | |
108 | 114 | | |
| |||
115 | 121 | | |
116 | 122 | | |
117 | 123 | | |
| 124 | + | |
118 | 125 | | |
119 | 126 | | |
120 | 127 | | |
| |||
260 | 267 | | |
261 | 268 | | |
262 | 269 | | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | 270 | | |
280 | 271 | | |
281 | 272 | | |
| |||
344 | 335 | | |
345 | 336 | | |
346 | 337 | | |
| 338 | + | |
347 | 339 | | |
348 | 340 | | |
349 | 341 | | |
| |||
387 | 379 | | |
388 | 380 | | |
389 | 381 | | |
| 382 | + | |
390 | 383 | | |
391 | 384 | | |
392 | 385 | | |
| |||
427 | 420 | | |
428 | 421 | | |
429 | 422 | | |
430 | | - | |
431 | 423 | | |
432 | 424 | | |
433 | 425 | | |
| |||
0 commit comments