All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] nouveau/compiler: fix trivial compiler warnings
@ 2015-07-08 18:27 Tobias Klausmann
       [not found] ` <1436380066-19851-1-git-send-email-tobias.johannes.klausmann-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Tobias Klausmann @ 2015-07-08 18:27 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

nouveau_compiler.c: In function ‘main’:
nouveau_compiler.c:216:27: warning: ‘code’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
       printf("%08x ", code[i / 4]);
                           ^
nouveau_compiler.c:215:4: warning: ‘size’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
    for (i = 0; i < size; i += 4) {

Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
---
 src/gallium/drivers/nouveau/nouveau_compiler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/nouveau_compiler.c b/src/gallium/drivers/nouveau/nouveau_compiler.c
index 8660498..ca128b5 100644
--- a/src/gallium/drivers/nouveau/nouveau_compiler.c
+++ b/src/gallium/drivers/nouveau/nouveau_compiler.c
@@ -144,7 +144,7 @@ main(int argc, char *argv[])
    const char *filename = NULL;
    FILE *f;
    char text[65536] = {0};
-   unsigned size, *code;
+   unsigned size = 0, *code = NULL;
 
    for (i = 1; i < argc; i++) {
       if (!strcmp(argv[i], "-a"))
-- 
2.4.5

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-07-08 20:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-08 18:27 [PATCH 1/2] nouveau/compiler: fix trivial compiler warnings Tobias Klausmann
     [not found] ` <1436380066-19851-1-git-send-email-tobias.johannes.klausmann-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
2015-07-08 18:27   ` [PATCH 2/2] nv50/ir: fix a compiler warning with debug-only code Tobias Klausmann
     [not found]     ` <1436380066-19851-2-git-send-email-tobias.johannes.klausmann-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
2015-07-08 19:34       ` Emil Velikov
     [not found]         ` <CACvgo50rFAxxP8JfG_WvqTkvA74eUzfy9v-KTCSHeMSkCYO-zA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-08 19:40           ` Tobias Klausmann
     [not found]             ` <559D7C98.5090102-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
2015-07-08 20:18               ` Ilia Mirkin
2015-07-08 18:38   ` [PATCH 1/2] nouveau/compiler: fix trivial compiler warnings Ilia Mirkin
     [not found]     ` <CAKb7UvgWcP4765FZFApRPdUY76B1DpOqZyRxz3K5g-n85qq+1w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-08 19:09       ` Tobias Klausmann
2015-07-08 19:31       ` Emil Velikov
     [not found]         ` <CACvgo52DmszQ4tA2FfCnXAy9vkUMse=zbgiHnNH23Mq3uR=C2Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-08 19:34           ` Tobias Klausmann
     [not found]             ` <559D7B41.5070802-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
2015-07-08 19:42               ` Emil Velikov
     [not found]                 ` <CACvgo53WL88Esa9iDL=so=zj9PpkKVX90ks8zyrYUHj4Ag2oXw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-08 19:53                   ` Tobias Klausmann
     [not found]                     ` <559D7FC2.5060500-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
2015-07-08 20:01                       ` Ilia Mirkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.