intel: Fix type pruned cast
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 5 Feb 2020 06:38:42 +0000 (15:38 +0900)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Tue, 8 Dec 2020 08:41:51 +0000 (17:41 +0900)
Fix build waring about type pruned cast in test_decode.c.

Change-Id: Iceea47c4a87c9db9d31a8a3c9e913a7407152e0a
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
intel/test_decode.c

index b9f5b92..c47752c 100644 (file)
@@ -86,7 +86,8 @@ static void
 compare_batch(struct drm_intel_decode *ctx, const char *batch_filename)
 {
        FILE *out = NULL;
-       void *ptr, *ref_ptr, *batch_ptr;
+       char *ptr;
+       void *ref_ptr, *batch_ptr;
 #if HAVE_OPEN_MEMSTREAM
        size_t size;
 #endif
@@ -106,7 +107,7 @@ compare_batch(struct drm_intel_decode *ctx, const char *batch_filename)
         * inside of an automake project's test infrastructure.
         */
 #if HAVE_OPEN_MEMSTREAM
-       out = open_memstream((char **)&ptr, &size);
+       out = open_memstream(&ptr, &size);
 #else
        fprintf(stderr, "platform lacks open_memstream, skipping.\n");
        exit(77);