[openbeos-preferences] bin cleanup

Hi,

I was stuck (once again) with the USB stack, so I decided to go and 
fool around somewhat
with arch (alternative to cvs www.gnu.org/software/gnu-arch). I tried 
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 

They're all trivial fixes anyway. The diff is included below. May I 
merge (and commit) the changes to cvs? If not, please let me know which 
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
===================================================================
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 = -1;             // output file descriptor
189c191
<       off_t   curr_written;        // number of bytes written to the 
current output file
---
>       off_t   curr_written = 0;    // number of bytes written to the 
> current output file
Index: clipboard.cpp
===================================================================
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 = B_BAD_VALUE;
>                                       break;
Index: df.cpp
===================================================================
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", 
fblocks);
---
>                                       sprintf(temp, "%.1fM", 
> fblocks);
215c215
<                                       sprintf(temp, "%.1LfG", 
fblocks);
---
>                                       sprintf(temp, "%.1fG", 
> fblocks);
Index: eject.c
===================================================================
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
===================================================================
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
===================================================================
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, 
used, left);
---
>       printf("memory: total: %4ldKB, used: %4ldKB, left: %4ldKB\n", 
> 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
===================================================================
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 = &info;
Index: shutdown.cpp
===================================================================
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 = -1; 

Other related posts: