From: "Joel Soete" <soete.joel@tiscali.be>
To: "Jon Oberheide" <jon@oberheide.org>
Cc: "Marcelo Tosatti" <marcelo.tosatti@cyclades.com>,
"Daniel Jacobowitz" <dan@debian.org>,
"Vojtech Pavlik" <vojtech@suse.cz>,
"Linux Kernel" <linux-kernel@vger.kernel.org>
Subject: Re: Some cleanup patches for: '...lvalues is deprecated'
Date: Fri, 30 Jul 2004 11:11:32 +0200 [thread overview]
Message-ID: <40FB9ACA0000533F@ocpmta1.freegates.net> (raw)
In-Reply-To: <1090945884.30149.1.camel@dionysus>
[-- Attachment #1: Type: text/plain, Size: 544 bytes --]
Hello *,
>
> FYI, lvalue casts are treated as errors in gcc 3.5.
>
According to this kind remark, I think so that following attachement patches
would be interesting.
Thanks for all relevant remarks to help me to make stuff cleaner.
Joel
PS: I don't yet review the lib/crc32.c (sorry I need more effort to review)
---------------------------------------------------------------------------
Tiscali ADSL LIGHT, 19,95 EUR/mois pendant 6 mois, c'est le moment de faire
le pas!
http://reg.tiscali.be/default.asp?lg=fr
[-- Attachment #2: drivers-video-fbcon.diff --]
[-- Type: application/octet-stream, Size: 547 bytes --]
--- linux-2.4.27-rc3-pa6mm/drivers/video/fbcon.c.Orig 2004-06-29 10:47:31.000000000 +0200
+++ linux-2.4.27-rc3-pa6mm/drivers/video/fbcon.c 2004-07-30 09:21:43.295828520 +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 -= 4;
+ 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 #3: fs-readdir.diff --]
[-- Type: application/octet-stream, Size: 769 bytes --]
--- linux-2.4.27-rc3-pa6mm/fs/readdir.c.Orig 2004-06-29 11:18:46.000000000 +0200
+++ linux-2.4.27-rc3-pa6mm/fs/readdir.c 2004-07-29 12:54:45.000000000 +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 = (struct linux_dirent *)((char *)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 = (struct linux_dirent64 *)((char *)dirent + reclen);
buf->current_dir = dirent;
buf->count -= reclen;
return 0;
[-- Attachment #4: kernel-sysctl.diff --]
[-- Type: application/octet-stream, Size: 1191 bytes --]
--- linux-2.4.27-rc3-pa6mm/kernel/sysctl.c.Orig 2004-06-29 09:03:42.000000000 +0200
+++ linux-2.4.27-rc3-pa6mm/kernel/sysctl.c 2004-07-29 11:41:30.021094824 +0200
@@ -883,14 +883,15 @@
for (; left && vleft--; i++, first=0) {
if (write) {
+ p = buffer;
while (left) {
char c;
- if (get_user(c, (char *) buffer))
+ if (get_user(c, p))
return -EFAULT;
if (!isspace(c))
break;
left--;
- ((char *) buffer)++;
+ p++;
}
if (!left)
break;
@@ -1036,14 +1037,15 @@
for (; left && vleft--; i++, min++, max++, first=0) {
if (write) {
+ p = buffer;
while (left) {
char c;
- if (get_user(c, (char *) buffer))
+ if (get_user(c, p))
return -EFAULT;
if (!isspace(c))
break;
left--;
- ((char *) buffer)++;
+ p++;
}
if (!left)
break;
@@ -1137,14 +1139,15 @@
for (; left && vleft--; i++, first=0) {
if (write) {
+ p = (char *)buffer;
while (left) {
char c;
- if (get_user(c, (char *) buffer))
+ if (get_user(c, p))
return -EFAULT;
if (!isspace(c))
break;
left--;
- ((char *) buffer)++;
+ p++;
}
if (!left)
break;
next prev parent reply other threads:[~2004-07-30 9:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-03 12:53 Some cleanup patches for: '...lvalues is deprecated' Joel Soete
2004-07-03 20:56 ` Vojtech Pavlik
2004-07-03 21:39 ` Joel Soete
2004-07-03 21:45 ` Vojtech Pavlik
2004-07-05 5:10 ` Daniel Jacobowitz
2004-07-05 8:59 ` David Vrabel
2004-07-05 11:59 ` Joel Soete
2004-07-27 12:54 ` Marcelo Tosatti
2004-07-27 15:59 ` Joel Soete
2004-07-27 15:59 ` Joel Soete
2004-07-27 16:31 ` Jon Oberheide
2004-07-30 9:11 ` Joel Soete [this message]
2004-07-30 12:51 ` Joel Soete
2004-07-30 17:29 ` Joel Soete
-- strict thread matches above, loose matches on Subject: below --
2004-07-31 8:41 Mikael Pettersson
2004-08-01 10:40 ` Adrian Bunk
2004-08-02 11:34 Mikael Pettersson
2004-08-02 23:08 ` Adrian Bunk
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=40FB9ACA0000533F@ocpmta1.freegates.net \
--to=soete.joel@tiscali.be \
--cc=dan@debian.org \
--cc=jon@oberheide.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com \
--cc=vojtech@suse.cz \
/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 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.