summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@dworkin.(none)>2009-03-27 18:03:00 -0400
committerDerrell Lipman <derrell@dworkin.(none)>2009-03-27 18:03:00 -0400
commit21ad907aa01d839d405b10809517d491b72184da (patch)
treee1c4adaa221fdb35ca2b056d9daada3e66c93a8a
parentc33f3d5cba21c8cf267daab5450bc95ea7e68967 (diff)
downloadsamba-21ad907aa01d839d405b10809517d491b72184da.tar.gz
samba-21ad907aa01d839d405b10809517d491b72184da.tar.bz2
samba-21ad907aa01d839d405b10809517d491b72184da.zip
Ensure parameter types match format string
-rw-r--r--examples/libsmbclient/testbrowse.c2
-rw-r--r--examples/libsmbclient/testfstatvfs.c21
-rw-r--r--examples/libsmbclient/testsmbc.c12
-rw-r--r--examples/libsmbclient/teststatvfs.c21
4 files changed, 38 insertions, 18 deletions
diff --git a/examples/libsmbclient/testbrowse.c b/examples/libsmbclient/testbrowse.c
index a6e6395078..c3fb3946da 100644
--- a/examples/libsmbclient/testbrowse.c
+++ b/examples/libsmbclient/testbrowse.c
@@ -197,7 +197,7 @@ get_auth_data_with_context_fn(SMBCCTX * context,
char * pPassword,
int maxLenPassword)
{
- printf("Authenticating with context 0x%lx", context);
+ printf("Authenticating with context %p", context);
if (context != NULL) {
char *user_data = smbc_getOptionUserData(context);
printf(" with user data %s", user_data);
diff --git a/examples/libsmbclient/testfstatvfs.c b/examples/libsmbclient/testfstatvfs.c
index b4dafefff6..73f42d446a 100644
--- a/examples/libsmbclient/testfstatvfs.c
+++ b/examples/libsmbclient/testfstatvfs.c
@@ -75,13 +75,20 @@ int main(int argc, char * argv[])
printf("\n");
printf("Block Size: %lu\n", statvfsbuf.f_bsize);
printf("Fragment Size: %lu\n", statvfsbuf.f_frsize);
- printf("Blocks: %llu\n", statvfsbuf.f_blocks);
- printf("Free Blocks: %llu\n", statvfsbuf.f_bfree);
- printf("Available Blocks: %llu\n", statvfsbuf.f_bavail);
- printf("Files : %llu\n", statvfsbuf.f_files);
- printf("Free Files: %llu\n", statvfsbuf.f_ffree);
- printf("Available Files: %llu\n", statvfsbuf.f_favail);
- printf("File System ID: %lu\n", statvfsbuf.f_fsid);
+ printf("Blocks: %llu\n",
+ (unsigned long long) statvfsbuf.f_blocks);
+ printf("Free Blocks: %llu\n",
+ (unsigned long long) statvfsbuf.f_bfree);
+ printf("Available Blocks: %llu\n",
+ (unsigned long long) statvfsbuf.f_bavail);
+ printf("Files : %llu\n",
+ (unsigned long long) statvfsbuf.f_files);
+ printf("Free Files: %llu\n",
+ (unsigned long long) statvfsbuf.f_ffree);
+ printf("Available Files: %llu\n",
+ (unsigned long long) statvfsbuf.f_favail);
+ printf("File System ID: %lu\n",
+ (unsigned long) statvfsbuf.f_fsid);
printf("\n");
printf("Flags: 0x%lx\n", statvfsbuf.f_flag);
diff --git a/examples/libsmbclient/testsmbc.c b/examples/libsmbclient/testsmbc.c
index 1f06437293..de42428c2b 100644
--- a/examples/libsmbclient/testsmbc.c
+++ b/examples/libsmbclient/testsmbc.c
@@ -21,6 +21,7 @@
#include <stdio.h>
#include <errno.h>
+#include <time.h>
#include <sys/time.h>
#include <string.h>
#include <unistd.h>
@@ -33,8 +34,12 @@ int global_id = 0;
void print_list_fn(struct print_job_info *pji)
{
- fprintf(stdout, "Print job: ID: %u, Prio: %u, Size: %u, User: %s, Name: %s\n",
- pji->id, pji->priority, pji->size, pji->user, pji->name);
+ fprintf(stdout, "Print job: ID: %u, Prio: %u, Size: %lu, User: %s, Name: %s\n",
+ pji->id,
+ pji->priority,
+ (unsigned long) pji->size,
+ pji->user,
+ pji->name);
global_id = pji->id;
@@ -137,7 +142,8 @@ int main(int argc, char *argv[])
}
- fprintf(stdout, "Wrote %d bytes to file: %s\n", sizeof(buff), buff);
+ fprintf(stdout, "Wrote %lu bytes to file: %s\n",
+ (unsigned long) sizeof(buff), buff);
/* Now, seek the file back to offset 0 */
diff --git a/examples/libsmbclient/teststatvfs.c b/examples/libsmbclient/teststatvfs.c
index 8812002d5c..b7e6b5159e 100644
--- a/examples/libsmbclient/teststatvfs.c
+++ b/examples/libsmbclient/teststatvfs.c
@@ -49,13 +49,20 @@ int main(int argc, char * argv[])
printf("\n");
printf("Block Size: %lu\n", statvfsbuf.f_bsize);
printf("Fragment Size: %lu\n", statvfsbuf.f_frsize);
- printf("Blocks: %llu\n", statvfsbuf.f_blocks);
- printf("Free Blocks: %llu\n", statvfsbuf.f_bfree);
- printf("Available Blocks: %llu\n", statvfsbuf.f_bavail);
- printf("Files : %llu\n", statvfsbuf.f_files);
- printf("Free Files: %llu\n", statvfsbuf.f_ffree);
- printf("Available Files: %llu\n", statvfsbuf.f_favail);
- printf("File System ID: %lu\n", statvfsbuf.f_fsid);
+ printf("Blocks: %llu\n",
+ (unsigned long long) statvfsbuf.f_blocks);
+ printf("Free Blocks: %llu\n",
+ (unsigned long long) statvfsbuf.f_bfree);
+ printf("Available Blocks: %llu\n",
+ (unsigned long long) statvfsbuf.f_bavail);
+ printf("Files : %llu\n",
+ (unsigned long long) statvfsbuf.f_files);
+ printf("Free Files: %llu\n",
+ (unsigned long long) statvfsbuf.f_ffree);
+ printf("Available Files: %llu\n",
+ (unsigned long long) statvfsbuf.f_favail);
+ printf("File System ID: %lu\n",
+ (unsigned long) statvfsbuf.f_fsid);
printf("\n");
printf("Flags: 0x%lx\n", statvfsbuf.f_flag);