summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-11-03 14:34:25 +0000
committerTim Potter <tpot@samba.org>2003-11-03 14:34:25 +0000
commitfbb8f131c2336e921677f41e9fb8bce7406f3336 (patch)
treed7af30424bebfbcbc6cf0d891bbd04c5deb74855 /source3/lib
parent490dbaec81007a9b5dd3aabfc188bdb397927e78 (diff)
downloadsamba-fbb8f131c2336e921677f41e9fb8bce7406f3336.tar.gz
samba-fbb8f131c2336e921677f41e9fb8bce7406f3336.tar.bz2
samba-fbb8f131c2336e921677f41e9fb8bce7406f3336.zip
Fix more 64-bit printf warnings.
(This used to be commit 23443e3aa079710221557e18158d0ddb8ff48a36)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c3
-rw-r--r--source3/lib/util_sock.c11
-rw-r--r--source3/lib/util_str.c5
3 files changed, 11 insertions, 8 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 766c5041b4..ce1389c8e9 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1404,7 +1404,8 @@ void smb_panic(const char *why)
backtrace_size = backtrace(backtrace_stack,BACKTRACE_STACK_SIZE);
backtrace_strings = backtrace_symbols(backtrace_stack, backtrace_size);
- DEBUG(0, ("BACKTRACE: %d stack frames:\n", backtrace_size));
+ DEBUG(0, ("BACKTRACE: %lu stack frames:\n",
+ (unsigned long)backtrace_size));
if (backtrace_strings) {
int i;
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index eb19caa31b..b59d7aa7eb 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -184,8 +184,8 @@ ssize_t read_udp_socket(int fd,char *buf,size_t len)
lastip = sock.sin_addr;
lastport = ntohs(sock.sin_port);
- DEBUG(10,("read_udp_socket: lastip %s lastport %d read: %d\n",
- inet_ntoa(lastip), lastport, ret));
+ DEBUG(10,("read_udp_socket: lastip %s lastport %d read: %lu\n",
+ inet_ntoa(lastip), lastport, (unsigned long)ret));
return(ret);
}
@@ -460,7 +460,7 @@ static ssize_t read_smb_length_return_keepalive(int fd,char *inbuf,unsigned int
DEBUG(5,("Got keepalive packet\n"));
}
- DEBUG(10,("got smb length of %d\n",len));
+ DEBUG(10,("got smb length of %lu\n",(unsigned long)len));
return(len);
}
@@ -487,7 +487,8 @@ ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout)
break;
}
- DEBUG(10,("read_smb_length: got smb length of %d\n",len));
+ DEBUG(10,("read_smb_length: got smb length of %lu\n",
+ (unsigned long)len));
return len;
}
@@ -529,7 +530,7 @@ BOOL receive_smb_raw(int fd,char *buffer, unsigned int timeout)
*/
if (len > (BUFFER_SIZE + LARGE_WRITEX_HDR_SIZE)) {
- DEBUG(0,("Invalid packet length! (%d bytes).\n",len));
+ DEBUG(0,("Invalid packet length! (%lu bytes).\n",(unsigned long)len));
if (len > BUFFER_SIZE + (SAFETY_MARGIN/2)) {
/*
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index 15ac1639a9..b6025a362d 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -590,8 +590,9 @@ char *safe_strcpy_fn(const char *fn, int line, char *dest,const char *src, size_
len = strnlen(src, maxlength+1);
if (len > maxlength) {
- DEBUG(0,("ERROR: string overflow by %u (%u - %u) in safe_strcpy [%.50s]\n",
- (unsigned int)(len-maxlength), len, maxlength, src));
+ DEBUG(0,("ERROR: string overflow by %lu (%lu - %lu) in safe_strcpy [%.50s]\n",
+ (unsigned long)(len-maxlength), (unsigned long)len,
+ (unsigned long)maxlength, src));
len = maxlength;
}