Fix error with -Werror=maybe-uninitialized 30/149630/2
authorDmitriy Evgenevich Gonzha <d.gonzha@samsung.com>
Tue, 12 Sep 2017 18:12:02 +0000 (21:12 +0300)
committerDmitriy Evgenevich Gonzha <d.gonzha@samsung.com>
Wed, 13 Sep 2017 10:08:33 +0000 (13:08 +0300)
Fix compilation error on ASan build:
tbm_surface_internal.c:2077:3: error: 'format' may be used
uninitialized in this function [-Werror=maybe-uninitialized]

Change-Id: Idb72be1135b22e8c8dfc4a156513346680affb3b
Signed-off-by: Dmitriy Evgenevich Gonzha <d.gonzha@samsung.com>
src/tbm_surface_internal.c

index 3633d73636d3e36ae56db5251123ab792223d015..20d7354b00fb927519cafdfe5f758f784bdcee87 100644 (file)
@@ -1989,7 +1989,7 @@ tbm_surface_internal_dump_buffer(tbm_surface_h surface, const char *type)
        tbm_surface_info_s info;
        tbm_bo_handle bo_handle;
        const char *postfix;
-       const char *format;
+       const char *format = NULL;
        char *keys;
        int ret;