]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Avoid some valgrind errors to be either detected to be supressed.
authorPeter Stamfest <peter@stamfest.at>
Mon, 1 Sep 2014 18:35:48 +0000 (20:35 +0200)
committerPeter Stamfest <peter@stamfest.at>
Mon, 1 Sep 2014 18:35:48 +0000 (20:35 +0200)
src/rrd_snprintf.c
tests/valgrind-supressions

index 0fd4f026e44f342820382760a2d0244e612ff9d8..d275e68909cd0226b2ce766b197e305f0152977c 100644 (file)
@@ -1112,8 +1112,10 @@ fmtflt(char *str, size_t *len, size_t size, LDOUBLE fvalue, int width,
        UINTMAX_T fracpart;
        UINTMAX_T mask;
        const char *infnan = NULL;
-       char iconvert[MAX_CONVERT_LENGTH];
-       char fconvert[MAX_CONVERT_LENGTH];
+        /* NOTE: We init the following variables, because valgrind complains 
+         * about them being used uninitialized in some cases. */
+       char iconvert[MAX_CONVERT_LENGTH] = "";
+       char fconvert[MAX_CONVERT_LENGTH] = "";
        char econvert[5];       /* "e-300" (without nul-termination). */
        char esign = 0;
        char sign = 0;
index 082e97e3e1e33f156830501bc15c435cb4c8a4f7..dd0aee5a43968cdcc7cfec7fd470b344a235b21a 100644 (file)
@@ -5,3 +5,17 @@
    fun:pixman_constructor
    ...
 }
+{
+   g_regex_new
+   Memcheck:Leak
+   ...
+   fun:g_once_init_enter
+   ...
+}
+{
+   g_regex_new
+   Memcheck:Leak
+   ...
+   fun:g_once_init_leave
+   ...
+}