[libgda] Avoid an implicit fallthrough warning with gcc 7.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Avoid an implicit fallthrough warning with gcc 7.
- Date: Sun, 29 Oct 2017 21:57:20 +0000 (UTC)
commit 849d9d7ecbfd15aac1256ee623983991d6cbd694
Author: Murray Cumming <murrayc murrayc com>
Date: Sun Oct 29 21:07:32 2017 +0100
Avoid an implicit fallthrough warning with gcc 7.
See
https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/
This was the warning:
libcsv.c: In function ‘csv_fini’:
libcsv.c:162:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
p->entry_pos -= p->spaces + 1; /* get rid of spaces and original quote */
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
libcsv.c:163:5: note: here
case FIELD_NOT_BEGUN:
^~~~
libgda/libcsv.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/libgda/libcsv.c b/libgda/libcsv.c
index 95795f0..99b19ef 100644
--- a/libgda/libcsv.c
+++ b/libgda/libcsv.c
@@ -160,6 +160,7 @@ csv_fini(struct csv_parser *p, void (*cb1)(char *, size_t, void *), void (*cb2)(
switch (p->pstate) {
case FIELD_MIGHT_HAVE_ENDED:
p->entry_pos -= p->spaces + 1; /* get rid of spaces and original quote */
+ /* fallthrough */
case FIELD_NOT_BEGUN:
case FIELD_BEGUN:
quoted = p->quoted, pstate = p->pstate;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]