1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-25 14:50:24 +03:00

Ensure parameter types match format string

This commit is contained in:
Derrell Lipman 2009-03-27 18:03:00 -04:00
parent c33f3d5cba
commit 21ad907aa0
4 changed files with 38 additions and 18 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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 */

View File

@ -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);