Re: [Nouveau] [PATCH 1/2] nouveau/compiler: fix trivial compiler warnings
I don't mind telling people that the compiler is wrong :) On Wed, Jul 8, 2015 at 3:53 PM, Tobias Klausmann wrote: > > > On 08.07.2015 21:42, Emil Velikov wrote: >> >> On 8 July 2015 at 20:34, Tobias Klausmann >> wrote: >>> >>> Mh i'm not aware of me ever changed the "nouveau_compiler". But i'm happy >>> to >>> see this made you laugh, so it has something positive at least... :/ >>> >> Story time: >> This particular compiler warning has been brought up (incl here) four >> or five times. Each time, Ilia feels reluctant about the fix as the >> (gcc) compiler gets it wrong. >> >> Personally I do not see a problem with explicitly initialising the >> variable at this instance, yet I'm curious for how long Ilia will say >> "no" to this (type of) patch(es) :-P >> >> No offence, I just find it funny. >> Emil > > Oh i did even answer in a thread for a patch from Martin where he propose > the same change (even with the same prefix :D). Ilia maybe you should take > this after all, as it seems you are haunted by this :P ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [Nouveau] [PATCH 1/2] nouveau/compiler: fix trivial compiler warnings
On 08.07.2015 21:42, Emil Velikov wrote: On 8 July 2015 at 20:34, Tobias Klausmann wrote: Mh i'm not aware of me ever changed the "nouveau_compiler". But i'm happy to see this made you laugh, so it has something positive at least... :/ Story time: This particular compiler warning has been brought up (incl here) four or five times. Each time, Ilia feels reluctant about the fix as the (gcc) compiler gets it wrong. Personally I do not see a problem with explicitly initialising the variable at this instance, yet I'm curious for how long Ilia will say "no" to this (type of) patch(es) :-P No offence, I just find it funny. Emil Oh i did even answer in a thread for a patch from Martin where he propose the same change (even with the same prefix :D). Ilia maybe you should take this after all, as it seems you are haunted by this :P ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [Nouveau] [PATCH 1/2] nouveau/compiler: fix trivial compiler warnings
On 8 July 2015 at 20:34, Tobias Klausmann wrote: > Mh i'm not aware of me ever changed the "nouveau_compiler". But i'm happy to > see this made you laugh, so it has something positive at least... :/ > Story time: This particular compiler warning has been brought up (incl here) four or five times. Each time, Ilia feels reluctant about the fix as the (gcc) compiler gets it wrong. Personally I do not see a problem with explicitly initialising the variable at this instance, yet I'm curious for how long Ilia will say "no" to this (type of) patch(es) :-P No offence, I just find it funny. Emil ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [Nouveau] [PATCH 1/2] nouveau/compiler: fix trivial compiler warnings
Mh i'm not aware of me ever changed the "nouveau_compiler". But i'm happy to see this made you laugh, so it has something positive at least... :/ On 08.07.2015 21:31, Emil Velikov wrote: Curious how many times this needs to come along, for you to change your mind. :-) On 8 July 2015 at 19:38, Ilia Mirkin wrote: Compiler is wrong. On Wed, Jul 8, 2015 at 2:27 PM, Tobias Klausmann wrote: 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 --- 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 ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [Nouveau] [PATCH 1/2] nouveau/compiler: fix trivial compiler warnings
Curious how many times this needs to come along, for you to change your mind. :-) On 8 July 2015 at 19:38, Ilia Mirkin wrote: > Compiler is wrong. > > On Wed, Jul 8, 2015 at 2:27 PM, Tobias Klausmann > wrote: >> 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 >> --- >> 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 > ___ > Nouveau mailing list > Nouveau@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/nouveau ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [Nouveau] [PATCH 1/2] nouveau/compiler: fix trivial compiler warnings
On 08.07.2015 20:38, Ilia Mirkin wrote: Compiler is wrong. So just "nouveau: ..." then? Anyway, change it to your liking. On Wed, Jul 8, 2015 at 2:27 PM, Tobias Klausmann wrote: 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 --- 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 ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [PATCH 1/2] nouveau/compiler: fix trivial compiler warnings
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 --- 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
Re: [Nouveau] [PATCH 1/2] nouveau/compiler: fix trivial compiler warnings
Compiler is wrong. On Wed, Jul 8, 2015 at 2:27 PM, Tobias Klausmann wrote: > 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 > --- > 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 ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau