[geany/geany-plugins] b72aaa: Overview: initialize color variables

Enrico Tröger git-noreply at xxxxx
Thu Oct 3 07:41:45 UTC 2019


Branch:      refs/heads/master
Author:      Enrico Tröger <enrico.troeger at uvena.de>
Committer:   Enrico Tröger <enrico.troeger at uvena.de>
Date:        Thu, 03 Oct 2019 07:41:45 UTC
Commit:      b72aaa2fa09d19731638f9e6e987ac8b1f76e7f9
             https://github.com/geany/geany-plugins/commit/b72aaa2fa09d19731638f9e6e987ac8b1f76e7f9

Log Message:
-----------
Overview: initialize color variables

While this might not be necessary technically, cppcheck complained:
overviewscintilla.c:800:53: note: Calling function 'overview_scintilla_get_overlay_color', 2nd argument '&color' value is <Uninit>
        overview_scintilla_get_overlay_color (self, &color);
                                                    ^
overviewscintilla.c:1146:11: note: Uninitialized variable: color


Modified Paths:
--------------
    overview/overview/overviewscintilla.c

Modified: overview/overview/overviewscintilla.c
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -796,14 +796,14 @@ overview_scintilla_get_property (GObject      *object,
       break;
     case PROP_OVERLAY_COLOR:
       {
-        OverviewColor color;
+        OverviewColor color = { 0 };
         overview_scintilla_get_overlay_color (self, &color);
         g_value_set_boxed (value, &color);
         break;
       }
     case PROP_OVERLAY_OUTLINE_COLOR:
       {
-        OverviewColor color;
+        OverviewColor color = { 0 };
         overview_scintilla_get_overlay_outline_color (self, &color);
         g_value_set_boxed (value, &color);
         break;



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list