Skip to contentSkip to conversation

dmabuf-heaps/dmabuf-heap.c: Initialize features variable to avoid compiler warning

PATCH In review Xiao Yang 3 participants 3 messages Nov 5, 2019 – Nov 7, 2019

Subsystems (2)
lore
Share & tools
lore

Xiao Yang

author
#0 lore raw

PATCH 1/1 dmabuf-heaps/dmabuf-heap.c: Initialize features variable to avoid compiler warning

---
 tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c +1 -1
index ec47901ef2e2..5e3eeec299b2 100644
@@ -154,7 +154,7 @@ static int do_test(char *heap_name)
 	int heap_fd = -1, dmabuf_fd = -1, importer_fd = -1;
 	uint32_t handle = 0;
 	void *p = NULL;
-	unsigned long long features;
+	unsigned long long features = 0;
 	int ret;
 
 	printf("Testing heap: %s\n", heap_name);
Signature · 1 line
2.21.0
maintainer
#1 lore raw
Quoted 2 lines · Xiao Yang

Missing commit log. Please add one to show the compiler warn you are fixing.

Quoted 10 lines
---
  tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c +0 -0
index ec47901ef2e2..5e3eeec299b2 100644

tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c static int do_test(char *heap_name) · line 160

Quoted 8 lines
tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c +1 -1
@@ -154,7 +154,7 @@ static int do_test(char *heap_name)
  	int heap_fd = -1, dmabuf_fd = -1, importer_fd = -1;
  	uint32_t handle = 0;
  	void *p = NULL;
-	unsigned long long features;
+	unsigned long long features = 0;
  	int ret;
 
  	printf("Testing heap: %s\n", heap_name);

thanks,
-- Shuah