summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorHerb Lewis <herb@samba.org>2006-12-19 20:16:52 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:37 -0500
commit55ed1d59455566d90a03e7123fbf7a05a4bd4539 (patch)
tree050bfb7a9e5ff6b9df388dd25e009defff81fe36 /source3/utils
parent920e1a368504228ab3a11aa58cbf12c7c95f4fd0 (diff)
downloadsamba-55ed1d59455566d90a03e7123fbf7a05a4bd4539.tar.gz
samba-55ed1d59455566d90a03e7123fbf7a05a4bd4539.tar.bz2
samba-55ed1d59455566d90a03e7123fbf7a05a4bd4539.zip
r20261: merge 20260 from samba_3_0_24
clean up a bunch of no previous prototype warnings (This used to be commit c60687db112405262adf26dbf267804b04074e67)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/debugparse.c1
-rw-r--r--source3/utils/eventlogadm.c4
-rw-r--r--source3/utils/log2pcaphex.c12
-rw-r--r--source3/utils/smbget.c24
4 files changed, 21 insertions, 20 deletions
diff --git a/source3/utils/debugparse.c b/source3/utils/debugparse.c
index c5fe3e2ee8..9c86fcc37b 100644
--- a/source3/utils/debugparse.c
+++ b/source3/utils/debugparse.c
@@ -245,6 +245,7 @@ dbg_Token dbg_char2token( dbg_Token *state, int c )
return( *state );
} /* dbg_char2token */
+void dbg_test( void );
void dbg_test( void )
/* ------------------------------------------------------------------------ **
* Simple test function.
diff --git a/source3/utils/eventlogadm.c b/source3/utils/eventlogadm.c
index 036ce3ad4b..a964043c83 100644
--- a/source3/utils/eventlogadm.c
+++ b/source3/utils/eventlogadm.c
@@ -60,7 +60,7 @@ static void display_eventlog_names( void )
printf( "\t<None specified>\n");
}
-int DoAddSourceCommand( int argc, char **argv, BOOL debugflag, char *exename )
+static int DoAddSourceCommand( int argc, char **argv, BOOL debugflag, char *exename )
{
if ( argc < 3 ) {
@@ -79,7 +79,7 @@ int DoAddSourceCommand( int argc, char **argv, BOOL debugflag, char *exename )
return 0;
}
-int DoWriteCommand( int argc, char **argv, BOOL debugflag, char *exename )
+static int DoWriteCommand( int argc, char **argv, BOOL debugflag, char *exename )
{
FILE *f1;
char *argfname;
diff --git a/source3/utils/log2pcaphex.c b/source3/utils/log2pcaphex.c
index aa68cf09c9..b7a595f754 100644
--- a/source3/utils/log2pcaphex.c
+++ b/source3/utils/log2pcaphex.c
@@ -96,7 +96,7 @@ typedef struct {
static hdr_tcp_t HDR_TCP = {139, 139, 0, 0, 0x50, 0, 0, 0, 0};
-void print_pcap_header(FILE *out)
+static void print_pcap_header(FILE *out)
{
struct tcpdump_file_header h;
h.magic = TCPDUMP_MAGIC;
@@ -109,7 +109,7 @@ void print_pcap_header(FILE *out)
fwrite(&h, sizeof(struct tcpdump_file_header), 1, out);
}
-void print_pcap_packet(FILE *out, unsigned char *data, long length, long caplen)
+static void print_pcap_packet(FILE *out, unsigned char *data, long length, long caplen)
{
static int i = 0;
struct tcpdump_packet p;
@@ -122,7 +122,7 @@ void print_pcap_packet(FILE *out, unsigned char *data, long length, long caplen)
fwrite(data, sizeof(unsigned char), caplen, out);
}
-void print_hex_packet(FILE *out, unsigned char *data, long length)
+static void print_hex_packet(FILE *out, unsigned char *data, long length)
{
long i,cur = 0;
while(cur < length) {
@@ -136,7 +136,7 @@ void print_hex_packet(FILE *out, unsigned char *data, long length)
}
}
-void print_netbios_packet(FILE *out, unsigned char *data, long length, long actual_length)
+static void print_netbios_packet(FILE *out, unsigned char *data, long length, long actual_length)
{
unsigned char *newdata; long offset = 0;
long newlen;
@@ -159,7 +159,7 @@ void print_netbios_packet(FILE *out, unsigned char *data, long length, long actu
unsigned char *curpacket = NULL;
long curpacket_len = 0;
-void read_log_msg(FILE *in, unsigned char **_buffer, long *buffersize, long *data_offset, long *data_length)
+static void read_log_msg(FILE *in, unsigned char **_buffer, long *buffersize, long *data_offset, long *data_length)
{
unsigned char *buffer;
int tmp; long i;
@@ -197,7 +197,7 @@ void read_log_msg(FILE *in, unsigned char **_buffer, long *buffersize, long *dat
*_buffer = buffer;
}
-long read_log_data(FILE *in, unsigned char *buffer, long data_length)
+static long read_log_data(FILE *in, unsigned char *buffer, long data_length)
{
long i, addr; char real[2][16]; int ret;
unsigned int tmp;
diff --git a/source3/utils/smbget.c b/source3/utils/smbget.c
index 83677359fe..4142b230f2 100644
--- a/source3/utils/smbget.c
+++ b/source3/utils/smbget.c
@@ -50,9 +50,9 @@ const char *username = NULL, *password = NULL, *workgroup = NULL;
int nonprompt = 0, quiet = 0, dots = 0, keep_permissions = 0, verbose = 0, send_stdout = 0;
int blocksize = SMB_DEFAULT_BLOCKSIZE;
-int smb_download_file(const char *base, const char *name, int recursive, int resume, char *outfile);
+static int smb_download_file(const char *base, const char *name, int recursive, int resume, char *outfile);
-int get_num_cols(void)
+static int get_num_cols(void)
{
#ifdef TIOCGWINSZ
struct winsize ws;
@@ -68,12 +68,12 @@ int get_num_cols(void)
#endif
}
-void change_columns(int sig)
+static void change_columns(int sig)
{
columns = get_num_cols();
}
-void human_readable(off_t s, char *buffer, int l)
+static void human_readable(off_t s, char *buffer, int l)
{
if(s > 1024 * 1024 * 1024) snprintf(buffer, l, "%.2fGb", 1.0 * s / (1024 * 1024 * 1024));
else if(s > 1024 * 1024) snprintf(buffer, l, "%.2fMb", 1.0 * s / (1024 * 1024));
@@ -81,7 +81,7 @@ void human_readable(off_t s, char *buffer, int l)
else snprintf(buffer, l, OFF_T_FORMAT"b", (OFF_T_FORMAT_CAST)s);
}
-void get_auth_data(const char *srv, const char *shr, char *wg, int wglen, char *un, int unlen, char *pw, int pwlen)
+static void get_auth_data(const char *srv, const char *shr, char *wg, int wglen, char *un, int unlen, char *pw, int pwlen)
{
static char hasasked = 0;
char *wgtmp, *usertmp;
@@ -113,7 +113,7 @@ void get_auth_data(const char *srv, const char *shr, char *wg, int wglen, char *
free(wgtmp); free(usertmp);
}
-int smb_download_dir(const char *base, const char *name, int resume)
+static int smb_download_dir(const char *base, const char *name, int resume)
{
char path[SMB_MAXPATHLEN];
int dirhandle;
@@ -199,7 +199,7 @@ int smb_download_dir(const char *base, const char *name, int resume)
return 1;
}
-char *print_time(long t)
+static char *print_time(long t)
{
static char buffer[100];
int secs, mins, hours;
@@ -215,7 +215,7 @@ char *print_time(long t)
return buffer;
}
-void print_progress(const char *name, time_t start, time_t now, off_t start_pos, off_t pos, off_t total)
+static void print_progress(const char *name, time_t start, time_t now, off_t start_pos, off_t pos, off_t total)
{
double avg = 0.0;
long eta = -1;
@@ -244,7 +244,7 @@ void print_progress(const char *name, time_t start, time_t now, off_t start_pos,
free(filename); free(status);
}
-int smb_download_file(const char *base, const char *name, int recursive, int resume, char *outfile) {
+static int smb_download_file(const char *base, const char *name, int recursive, int resume, char *outfile) {
int remotehandle, localhandle;
time_t start_time = time(NULL);
const char *newpath;
@@ -447,7 +447,7 @@ int smb_download_file(const char *base, const char *name, int recursive, int res
return 1;
}
-void clean_exit(void)
+static void clean_exit(void)
{
char bs[100];
human_readable(total_bytes, bs, sizeof(bs));
@@ -455,12 +455,12 @@ void clean_exit(void)
exit(0);
}
-void signal_quit(int v)
+static void signal_quit(int v)
{
clean_exit();
}
-int readrcfile(const char *name, const struct poptOption long_options[])
+static int readrcfile(const char *name, const struct poptOption long_options[])
{
FILE *fd = fopen(name, "r");
int lineno = 0, i;