lkml.org 
[lkml]   [2000]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject2.2.18pre10: A few warnings less...
Date
From
A few extra notes:

- Several places use long (or unsigned long) formats for the result of
ntohl(), this is a 32-bit quantity. Makes no difference on ia32, but could
bite on Alpha (an int is 32, a long is 64 there)

- There are several headers for NFS:
include/linux/nfs.h
include/linux/nfs2.h
include/linux/nfs3.h
include/linux/nfsd/const.h
Several constants defined in nfs?.h are repeated in nfsd/const.h, which
on the whole seems to be more complete than the others. Should this stuff
be moved into nfs?.d, and nfsd/const.h deleted? What about nfs.h, which
duplicates other stuff?

- The whole nls stuff is a bunch of tables plus a few functions and
structures that look like boilerplate code to my (untrained) eye. I'd
rewrite the whole lot as the tables plus an #included file that gives the
rest, to reduce the possibility of code skew. They all seem to have a
(minor) bug in that their users (e.g, fs/vfat/namei.c:679)pass a const char
pointer to ->char2uni() (one of the functions replicated in each nls
module) which is declared to take a plain char pointer. This function
doesn't modify anything, so const char pointer is really right. But to
change them all is a mess... I'd prefer to do it as explained earlier.
Comments?


--- ./fs/isofs/joliet.c-2.2.18pre10 Wed Jun 7 17:26:43 2000
+++ ./fs/isofs/joliet.c Tue Sep 26 20:40:26 2000
@@ -19,8 +19,6 @@
struct nls_table *nls)
{
unsigned char *ip, *op;
- unsigned char ch, cl;
- unsigned char *uni_page;

ip = uni;
op = ascii;
--- ./fs/fat/dir.c-2.2.18pre10 Sun Sep 24 00:14:47 2000
+++ ./fs/fat/dir.c Tue Sep 26 19:41:31 2000
@@ -68,8 +68,6 @@
struct nls_table *nls)
{
unsigned char *ip, *op;
- unsigned char ch, cl;
- unsigned char *uni_page;
unsigned short val;

ip = uni;
--- ./net/ipv4/ip_masq_user.c-2.2.18pre10 Wed May 3 20:16:53 2000
+++ ./net/ipv4/ip_masq_user.c Tue Sep 26 23:01:40 2000
@@ -401,7 +401,7 @@

magic_control = atomic_read(&ms->n_control);
if (!magic_control && ms->control) magic_control = -1;
- sprintf(temp,"%-4s %08lX:%04X %08lX:%04X %08lX:%04X %-12s %3X %4d %3d %7lu %4d %4d",
+ sprintf(temp,"%-4s %08X:%04X %08X:%04X %08X:%04X %-12s %3X %4d %3d %7lu %4d %4d",
masq_proto_name(ms->protocol),
ntohl(ms->saddr), ntohs(ms->sport),
ntohl(ms->daddr), ntohs(ms->dport),
--- ./net/ipv4/ip_masq_irc.c-2.2.18pre10 Sun Sep 24 00:14:50 2000
+++ ./net/ipv4/ip_masq_irc.c Tue Sep 26 23:07:50 2000
@@ -77,8 +77,6 @@
* List of supported DCC protocols
*/

-#define NUM_DCCPROTO 5
-
struct dccproto
{
char *match;
@@ -93,6 +91,9 @@
{ "SCHAT ", 6 },
{ "ACCEPT ", 7 },
};
+
+#define NUM_DCCPROTO (sizeof dccprotos / sizeof dccprotos[0])
+
#define MAXMATCHLEN 7

static int
@@ -225,7 +226,7 @@
* Replace the old "address port" with the new one
*/

- buf_len = sprintf(buf,"%lu %u",
+ buf_len = sprintf(buf,"%u %u",
ntohl(n_ms->maddr),ntohs(n_ms->mport));

/*
@@ -347,7 +348,7 @@
* Replace the outside address with the inside address
*/

- buf_len = sprintf(buf,"%lu %u",
+ buf_len = sprintf(buf,"%u %u",
ntohl(n_ms->saddr),ntohs(n_ms->sport));

/*
--- ./drivers/usb/usb-uhci.c-2.2.18pre10 Tue Sep 26 19:34:18 2000
+++ ./drivers/usb/usb-uhci.c Tue Sep 26 19:32:19 2000
@@ -1423,14 +1423,14 @@
continue;
}

- if(urb->iso_frame_desc[n].length > maxsze) {
#ifdef ISO_SANITY_CHECK
+ if(urb->iso_frame_desc[n].length > maxsze) {
err("submit_iso: urb->iso_frame_desc[%d].length(%d)>%d",n , urb->iso_frame_desc[n].length, maxsze);
tdm[n] = 0;
ret=-EINVAL;
goto inval;
-#endif
}
+#endif

ret = alloc_td (&td, UHCI_PTR_DEPTH);
inval:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.070 / U:0.080 seconds]
©2003-2014 Jasper Spaans. Advertise on this site