fix warning in tdfxfb.c
PATCH 1/1 fix warning in tdfxfb.c
This patch is obviously correct. It doesn't appear that tdfxfb has a maintainer, so I'm sending this patch to the list. Nothing earth-shattering, it just removes a warning during build.
Signature · 15 lines
-Steven
In a time of universal deceit, telling the truth is a revolutionary act.
-- George Orwell
--- tdfxfb.c~ Sat Jun 16 13:09:08 2001
+++ tdfxfb.c Sat Jun 16 13:09:21 2001
@@ -1892,7 +1892,7 @@
((pdev->device == PCI_DEVICE_ID_3DFX_BANSHEE) ||
(pdev->device == PCI_DEVICE_ID_3DFX_VOODOO3) ||
(pdev->device == PCI_DEVICE_ID_3DFX_VOODOO5))) {
- char *name;
+ char *name = NULL;
fb_info.dev = pdev->device;
switch (pdev->device) {I'm using 2.95.2; perhaps its fixed in 2.96/CVS?
Quoted 6 lines · Alan Cox
Quoted 4 lines
This patch is obviously correct. It doesn't appear that tdfxfb has a maintainer, so I'm sending this patch to the list. Nothing
earth-shattering, it just removes a warning during build.
Yep.. Im actually suprised gcc couldnt work that one out itself.
Signature · 3 lines
-Steven In a time of universal deceit, telling the truth is a revolutionary act. -- George Orwell
Quoted 3 lines · Josh Myer
It might be better to add a default case to the switch statement below, so this symbol doesn't just eat up another 4(8 on some platforms, and i'm sure others) bytes of memory unneccesarily.
I'm not quite sure I follow you. The default case should never be reached, because only the three cases currently present are allowed by the encapsulating 'if' statement. Even so, how would adding a default case get rid of the variable or save space some other way?
Quoted 3 lines
anyway, it doesn't really matter. i'd test my hypothesis, but i've got people coming over this afternoon =) the driver looks like it might use some scrubbing anyway (s!//(.*)$!/\* $1 \*/!...)
Good point. Perhaps I'll prepare a larger patch with this and other cleanups.
Signature · 3 lines
-Steven In a time of universal deceit, telling the truth is a revolutionary act. -- George Orwell