blob: ba042a24b4ec1ab50732ff945edf14ca3163a0f8 [file] [log] [blame]
Patrick Williamsddad1a12017-02-23 20:36:32 -06001From 7affb288d6c0726e7b1ebc317a878927b6ef0d02 Mon Sep 17 00:00:00 2001
2From: Andrea Galbusera <gizero@gmail.com>
3Date: Tue, 13 Sep 2016 08:10:29 +0200
4Subject: [PATCH] inotifywait: fix compile error with GCC 6
5
6Fails to compile with misleading-indentation error
7
8| src/inotifywait.c: In function 'output_event_csv':
9| src/inotifywait.c:126:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
10| if (filename != NULL)
11| ^~
12| src/inotifywait.c:129:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
13| printf("%s,", csv_escape( inotifytools_event_to_str( event->mask ) ) );
14| ^~~~~~
15| cc1: all warnings being treated as errors
16
17Fix indentation to resolve.
18
19Upstream-Status: Submitted [https://github.com/rvoicilas/inotify-tools/pull/66]
20
21Signed-off-by: Andrea Galbusera <gizero@gmail.com>
22---
23 src/inotifywait.c | 6 +++---
24 1 file changed, 3 insertions(+), 3 deletions(-)
25
26diff --git a/src/inotifywait.c b/src/inotifywait.c
27index c5ce5e3..404a85b 100644
28--- a/src/inotifywait.c
29+++ b/src/inotifywait.c
30@@ -122,9 +122,9 @@ void validate_format( char * fmt ) {
31
32
33 void output_event_csv( struct inotify_event * event ) {
34- char *filename = csv_escape(inotifytools_filename_from_wd(event->wd));
35- if (filename != NULL)
36- printf("%s,", filename);
37+ char *filename = csv_escape(inotifytools_filename_from_wd(event->wd));
38+ if (filename != NULL)
39+ printf("%s,", filename);
40
41 printf("%s,", csv_escape( inotifytools_event_to_str( event->mask ) ) );
42 if ( event->len > 0 )
43--
441.9.1
45