From: "Joel Soete" <soete.joel@tiscali.be>
To: "Linux Kernel" <linux-kernel@vger.kernel.org>
Subject: FW: Some cleanup patches for: '...lvalues is deprecated'
Date: Wed, 30 Jun 2004 08:33:27 +0200 [thread overview]
Message-ID: <40BDA020000127E5@ocpmta3.freegates.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 205 bytes --]
---------------------------------------------------------------------------
NEW: Tiscali ADSL LIGHT, 28,95 EUR/mois, c'est le moment de faire le pas!
http://reg.tiscali.be/default.asp?lg=fr
[-- Attachment #2: Type: message/rfc822, Size: 8974 bytes --]
[-- Attachment #2.1.1: Type: text/plain, Size: 3561 bytes --]
Hi Marcelo,
Here are some backport to clean up some warning of type: use of cast experssion
as lvalues is deprecated.
--- linux-2.4.27-rc2-pa4mm/kernel/sysctl.c.Orig 2004-06-29 09:03:42.000000000
+0200
+++ linux-2.4.27-rc2-pa4mm/kernel/sysctl.c 2004-06-29 10:10:31.588030256
+0200
@@ -890,7 +890,7 @@
if (!isspace(c))
break;
left--;
- ((char *) buffer)++;
+ buffer += sizeof(char);
}
if (!left)
break;
@@ -1043,7 +1043,7 @@
if (!isspace(c))
break;
left--;
- ((char *) buffer)++;
+ buffer += sizeof(char);
}
if (!left)
break;
@@ -1144,7 +1144,7 @@
if (!isspace(c))
break;
left--;
- ((char *) buffer)++;
+ buffer += sizeof(char);
}
if (!left)
break;
=========><=========
--- linux-2.4.27-rc2-pa4mm/fs/readdir.c.Orig 2004-06-29 11:18:46.636488264
+0200
+++ linux-2.4.27-rc2-pa4mm/fs/readdir.c 2004-06-29 11:25:40.281604648 +0200
@@ -264,7 +264,7 @@
put_user(reclen, &dirent->d_reclen);
copy_to_user(dirent->d_name, name, namlen);
put_user(0, dirent->d_name + namlen);
- ((char *) dirent) += reclen;
+ dirent = (void *)dirent + reclen;
buf->current_dir = dirent;
buf->count -= reclen;
return 0;
@@ -347,7 +347,7 @@
copy_to_user(dirent, &d, NAME_OFFSET(&d));
copy_to_user(dirent->d_name, name, namlen);
put_user(0, dirent->d_name + namlen);
- ((char *) dirent) += reclen;
+ dirent = (void *)dirent + reclen;
buf->current_dir = dirent;
buf->count -= reclen;
return 0;
=========><=========
--- linux-2.4.27-rc2-pa4mm/drivers/video/fbcon.c.Orig 2004-06-29 10:47:31.901491304
+0200
+++ linux-2.4.27-rc2-pa4mm/drivers/video/fbcon.c 2004-06-29 11:13:31.846343640
+0200
@@ -1877,7 +1877,10 @@
font length must be multiple of 256, at least. And 256 is multiple
of 4 */
k = 0;
- while (p > new_data) k += *--(u32 *)p;
+ while (p > new_data) {
+ p = (u8 *)((u32 *)p - 1);
+ k += *(u32 *)p;
+ }
FNTSUM(new_data) = k;
/* Check if the same font is on some other console already */
for (i = 0; i < MAX_NR_CONSOLES; i++) {
=========><=========
--- linux-2.4.27-rc2-pa4mm/lib/crc32.c.Orig 2004-06-29 11:29:31.721420448
+0200
+++ linux-2.4.27-rc2-pa4mm/lib/crc32.c 2004-06-29 11:36:19.964358088 +0200
@@ -99,7 +99,9 @@
/* Align it */
if(unlikely(((long)b)&3 && len)){
do {
- DO_CRC(*((u8 *)b)++);
+ u8 *p = (u8 *)b;
+ DO_CRC(*p++);
+ b = (void *)p;
} while ((--len) && ((long)b)&3 );
}
if(likely(len >= 4)){
@@ -120,7 +122,9 @@
/* And the last few bytes */
if(len){
do {
- DO_CRC(*((u8 *)b)++);
+ u8 *p = (u8 *)b;
+ DO_CRC(*p++);
+ b = (void *)p;
} while (--len);
}
@@ -200,7 +204,9 @@
/* Align it */
if(unlikely(((long)b)&3 && len)){
do {
- DO_CRC(*((u8 *)b)++);
+ u8 *p = (u8 *)b;
+ DO_CRC(*p++);
+ b = (void *)p;
} while ((--len) && ((long)b)&3 );
}
if(likely(len >= 4)){
@@ -221,7 +227,9 @@
/* And the last few bytes */
if(len){
do {
- DO_CRC(*((u8 *)b)++);
+ u8 *p = (u8 *)b;
+ DO_CRC(*p++);
+ b = (void *)p;
} while (--len);
}
return __be32_to_cpu(crc);
=========><=========
hth,
Joel
PS: because of bad wrapping pb with mail interface I also join original
files
---------------------------------------------------------------------------
NEW: Tiscali ADSL LIGHT, 28,95 EUR/mois, c'est le moment de faire le pas!
http://reg.tiscali.be/default.asp?lg=fr
[-- Attachment #2.1.2: k-2.4.27-rc2_sysctl.c.diff --]
[-- Type: application/octet-stream, Size: 635 bytes --]
--- linux-2.4.27-rc2-pa4mm/kernel/sysctl.c.Orig 2004-06-29 09:03:42.000000000 +0200
+++ linux-2.4.27-rc2-pa4mm/kernel/sysctl.c 2004-06-29 10:10:31.588030256 +0200
@@ -890,7 +890,7 @@
if (!isspace(c))
break;
left--;
- ((char *) buffer)++;
+ buffer += sizeof(char);
}
if (!left)
break;
@@ -1043,7 +1043,7 @@
if (!isspace(c))
break;
left--;
- ((char *) buffer)++;
+ buffer += sizeof(char);
}
if (!left)
break;
@@ -1144,7 +1144,7 @@
if (!isspace(c))
break;
left--;
- ((char *) buffer)++;
+ buffer += sizeof(char);
}
if (!left)
break;
[-- Attachment #2.1.3: k-2.4.27-rc2_readdir.c.diff --]
[-- Type: application/octet-stream, Size: 717 bytes --]
--- linux-2.4.27-rc2-pa4mm/fs/readdir.c.Orig 2004-06-29 11:18:46.636488264 +0200
+++ linux-2.4.27-rc2-pa4mm/fs/readdir.c 2004-06-29 11:25:40.281604648 +0200
@@ -264,7 +264,7 @@
put_user(reclen, &dirent->d_reclen);
copy_to_user(dirent->d_name, name, namlen);
put_user(0, dirent->d_name + namlen);
- ((char *) dirent) += reclen;
+ dirent = (void *)dirent + reclen;
buf->current_dir = dirent;
buf->count -= reclen;
return 0;
@@ -347,7 +347,7 @@
copy_to_user(dirent, &d, NAME_OFFSET(&d));
copy_to_user(dirent->d_name, name, namlen);
put_user(0, dirent->d_name + namlen);
- ((char *) dirent) += reclen;
+ dirent = (void *)dirent + reclen;
buf->current_dir = dirent;
buf->count -= reclen;
return 0;
[-- Attachment #2.1.4: k-2.4.27-rc2_fbcon.c.diff --]
[-- Type: application/octet-stream, Size: 579 bytes --]
--- linux-2.4.27-rc2-pa4mm/drivers/video/fbcon.c.Orig 2004-06-29 10:47:31.901491304 +0200
+++ linux-2.4.27-rc2-pa4mm/drivers/video/fbcon.c 2004-06-29 11:13:31.846343640 +0200
@@ -1877,7 +1877,10 @@
font length must be multiple of 256, at least. And 256 is multiple
of 4 */
k = 0;
- while (p > new_data) k += *--(u32 *)p;
+ while (p > new_data) {
+ p = (u8 *)((u32 *)p - 1);
+ k += *(u32 *)p;
+ }
FNTSUM(new_data) = k;
/* Check if the same font is on some other console already */
for (i = 0; i < MAX_NR_CONSOLES; i++) {
[-- Attachment #2.1.5: k-2.4.27-rc2_crc32.c.diff --]
[-- Type: application/octet-stream, Size: 1002 bytes --]
--- linux-2.4.27-rc2-pa4mm/lib/crc32.c.Orig 2004-06-29 11:29:31.721420448 +0200
+++ linux-2.4.27-rc2-pa4mm/lib/crc32.c 2004-06-29 11:36:19.964358088 +0200
@@ -99,7 +99,9 @@
/* Align it */
if(unlikely(((long)b)&3 && len)){
do {
- DO_CRC(*((u8 *)b)++);
+ u8 *p = (u8 *)b;
+ DO_CRC(*p++);
+ b = (void *)p;
} while ((--len) && ((long)b)&3 );
}
if(likely(len >= 4)){
@@ -120,7 +122,9 @@
/* And the last few bytes */
if(len){
do {
- DO_CRC(*((u8 *)b)++);
+ u8 *p = (u8 *)b;
+ DO_CRC(*p++);
+ b = (void *)p;
} while (--len);
}
@@ -200,7 +204,9 @@
/* Align it */
if(unlikely(((long)b)&3 && len)){
do {
- DO_CRC(*((u8 *)b)++);
+ u8 *p = (u8 *)b;
+ DO_CRC(*p++);
+ b = (void *)p;
} while ((--len) && ((long)b)&3 );
}
if(likely(len >= 4)){
@@ -221,7 +227,9 @@
/* And the last few bytes */
if(len){
do {
- DO_CRC(*((u8 *)b)++);
+ u8 *p = (u8 *)b;
+ DO_CRC(*p++);
+ b = (void *)p;
} while (--len);
}
return __be32_to_cpu(crc);
reply other threads:[~2004-06-30 6:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40BDA020000127E5@ocpmta3.freegates.net \
--to=soete.joel@tiscali.be \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®