lkml.org 
[lkml]   [2002]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] 2.5.21 kill warnings 6/19
- Fix compilation warnings in cfbimgblt.c.

- Fix improper __FUNCTION__ usage in smb_debug.h.

It's all about giving the compiler a chance to coalesce
equal string constants - a good reason for the
C language standard to depricate the old semantics.
diff -urN linux-2.5.21/drivers/video/cfbimgblt.c linux/drivers/video/cfbimgblt.c
--- linux-2.5.21/drivers/video/cfbimgblt.c 2002-06-09 07:26:29.000000000 +0200
+++ linux/drivers/video/cfbimgblt.c 2002-06-09 19:39:17.000000000 +0200
@@ -43,12 +43,14 @@

void cfb_imageblit(struct fb_info *p, struct fb_image *image)
{
- int pad, ppw, shift, shift_right, shift_left, x2, y2, n, i, j, k, l = 7;
+ int pad, ppw;
+ int x2, y2, n, i, j, k, l = 7;
unsigned long tmp = ~0 << (BITS_PER_LONG - p->var.bits_per_pixel);
unsigned long fgx, bgx, fgcolor, bgcolor, eorx;
- unsigned long end_index, end_mask;
+ unsigned long end_mask;
unsigned long *dst = NULL;
- u8 *dst1, *src;
+ u8 *dst1;
+ u8 *src;

/*
* We could use hardware clipping but on many cards you get around hardware
@@ -97,8 +99,8 @@
for (j = image->width/ppw; j > 0; j--) {
end_mask = 0;

- for (k = ppw; k > 0; k--) {
- if (test_bit(l, src))
+ for (k = ppw; k > 0; k--) {
+ if (test_bit(l, (unsigned long *) src))
end_mask |= (tmp >> (p->var.bits_per_pixel*(k-1)));
l--;
if (l < 0) { l = 7; src++; }
@@ -110,7 +112,7 @@
if (n) {
end_mask = 0;
for (j = n; j > 0; j--) {
- if (test_bit(l, src))
+ if (test_bit(l, (unsigned long *) src))
end_mask |= (tmp >> (p->var.bits_per_pixel*(j-1)));
l--;
if (l < 0) { l = 7; src++; }
diff -urN linux-2.5.21/fs/smbfs/smb_debug.h linux/fs/smbfs/smb_debug.h
--- linux-2.5.21/fs/smbfs/smb_debug.h 2002-06-09 07:27:26.000000000 +0200
+++ linux/fs/smbfs/smb_debug.h 2002-06-09 19:12:14.000000000 +0200
@@ -7,20 +7,20 @@
(dentry)->d_parent->d_name.name,(dentry)->d_name.name

/*
- * safety checks that should never happen ???
+ * safety checks that should never happen ???
* these are normally enabled.
*/
#ifdef SMBFS_PARANOIA
-#define PARANOIA(x...) printk(KERN_NOTICE __FUNCTION__ ": " x)
+# define PARANOIA(f, a...) printk(KERN_NOTICE "%s: " f, __FUNCTION__, ## a)
#else
-#define PARANOIA(x...) do { ; } while(0)
+# define PARANOIA(f, a...) do { ; } while(0)
#endif

/* lots of debug messages */
#ifdef SMBFS_DEBUG_VERBOSE
-#define VERBOSE(x...) printk(KERN_DEBUG __FUNCTION__ ": " x)
+# define VERBOSE(f, a...) printk(KERN_DEBUG "%s: " f, __FUNCTION__, ## a)
#else
-#define VERBOSE(x...) do { ; } while(0)
+# define VERBOSE(f, a...) do { ; } while(0)
#endif

/*
\
 
 \ /
  Last update: 2005-03-22 13:22    [W:0.412 / U:1.812 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site