bin cleanup

"Niels Reedijk" <n.reedijk-EIBgga6/0yRmR6Xm/[email protected]> Sat, 29 Nov 2003 23:27:07 GMT
Newsgroups gmane.os.openbeos.preferences
Message-ID <[email protected]>
Hi,

I was stuck (once again) with the USB stack, so I decided to go and=20
fool around somewhat
with arch (alternative to cvs www.gnu.org/software/gnu-arch). I tried=20
fixing the warnings that would be spit out when compiling /current/src/
apps/bin/, and here's the first part of the
fixes:

patch-1
    Fix warning df.cpp
patch-2
    Fix warning in roster.cpp
patch-3
    Fix warning in clipboard.cpp
patch-4
    Fix warning in shutdown.cpp (trivial)
patch-5
    Fix warnings in chop.c (trivial)
patch-6
    Trivial warning fix in eject.c
patch-7
    Trivial warning fix in hd.c
patch-8
    Trivial warning fixes in listarea.c=20

They're all trivial fixes anyway. The diff is included below. May I=20
merge (and commit) the changes to cvs? If not, please let me know which=20
ones can be committed. Thanks a lot.

Niels

P.S. I'll see if I can continue this round of fixing tomorrow


Here's the diff (long)
Index: chop.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/open-beos/current/src/apps/bin/chop.c,v
retrieving revision 1.2
diff -r1.2 chop.c
42a43,44
> #include <stdlib.h>
> #include <string.h>
183c185
<       int  fdout;                  // output file descriptor
---
>       int  fdout =3D -1;             // output file descriptor
189c191
<       off_t   curr_written;        // number of bytes written to the=20
current output file
---
>       off_t   curr_written =3D 0;    // number of bytes written to the=20
> current output file
Index: clipboard.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/open-beos/current/src/apps/bin/clipboard.cpp,v
retrieving revision 1.2
diff -r1.2 clipboard.cpp
160a161,163
>                               default:        //Shouldn't happen
>                                       Status::Code =3D B_BAD_VALUE;
>                                       break;
Index: df.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/open-beos/current/src/apps/bin/df.cpp,v
retrieving revision 1.2
diff -r1.2 df.cpp
208c208
<                               sprintf(temp, "%.1LfK", fblocks);
---
>                               sprintf(temp, "%.1fK", fblocks);
212c212
<                                       sprintf(temp, "%.1LfM",=20
fblocks);
---
>                                       sprintf(temp, "%.1fM",=20
> fblocks);
215c215
<                                       sprintf(temp, "%.1LfG",=20
fblocks);
---
>                                       sprintf(temp, "%.1fG",=20
> fblocks);
Index: eject.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/open-beos/current/src/apps/bin/eject.c,v
retrieving revision 1.2
diff -r1.2 eject.c
22c22
< int usage(char *prog)
---
> static int usage(char *prog)
Index: hd.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/open-beos/current/src/apps/bin/hd.c,v
retrieving revision 1.2
diff -r1.2 hd.c
16a17,18
> #include <stdlib.h>
> #include <string.h>
139c141
<       printf("%08x ", offset);
---
>       printf("%08lx ", offset);
Index: listarea.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/open-beos/current/src/apps/bin/listarea.c,v
retrieving revision 1.2
diff -r1.2 listarea.c
61c61
<       printf("memory: total: %4dKB, used: %4dKB, left: %4dKB\n", max,=20
used, left);
---
>       printf("memory: total: %4ldKB, used: %4ldKB, left: %4ldKB\n",=20
> max, used, left);
73c73
<               printf("\nteam %d unknown\n", id);
---
>               printf("\nteam %ld unknown\n", id);
77c77
<       printf("\nTEAM %4d (%s):\n", id, this_team.args);
---
>       printf("\nTEAM %4ld (%s):\n", id, this_team.args);
82c82
<               printf("%5d %29s %.8x %8x %8x %5d %5d %5d\n",
---
>               printf("%5ld %29s %p %8lx %8lx %5ld %5ld %5ld\n",
Index: roster.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/open-beos/current/src/apps/bin/roster.cpp,v
retrieving revision 1.1
diff -r1.1 roster.cpp
28d27
<       app_info *pinfo =3D &info;
Index: shutdown.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/open-beos/current/src/apps/bin/shutdown.cpp,v
retrieving revision 1.5
diff -r1.5 shutdown.cpp
412c412
<               thread_id BApp_thread;
---
>               thread_id BApp_thread =3D -1;=20