[libgda] gda-handler-time: Avoid warning about implicit fallthrough.



commit 981f6fc6882b92163fbfc03a6b0cf14c66a04944
Author: Murray Cumming <murrayc murrayc com>
Date:   Sun Oct 29 21:00:59 2017 +0100

    gda-handler-time: Avoid warning about implicit fallthrough.
    
    To avoid this compiler warnings (or error, with -Werror) from gcc 7:
    
    gda-handler-time.c: In function ‘handler_compute_locale’:
    gda-handler-time.c:375:43: error: this statement may fall through
    [-Werror=implicit-fallthrough=]
         hdl->priv->str_locale->twodigit_years = TRUE;
         gda-handler-time.c:376:4: note: here
             case 1976:
                 ^~~~

 libgda/handlers/gda-handler-time.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/libgda/handlers/gda-handler-time.c b/libgda/handlers/gda-handler-time.c
index 10a628b..c58e418 100644
--- a/libgda/handlers/gda-handler-time.c
+++ b/libgda/handlers/gda-handler-time.c
@@ -373,6 +373,8 @@ handler_compute_locale (GdaHandlerTime *hdl)
                                break;
                        case 76:
                                hdl->priv->str_locale->twodigit_years = TRUE;
+                               hdl->priv->str_locale->dmy_order[i] = G_DATE_YEAR;
+                                break;
                        case 1976:
                                hdl->priv->str_locale->dmy_order[i] = G_DATE_YEAR;
                                break;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]