Skip to content

Commit

Permalink
Fix a few printf format errors
Browse files Browse the repository at this point in the history
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Jeremy Allison <[email protected]>
  • Loading branch information
vlendec authored and jrasamba committed May 7, 2015
1 parent 81da2aa commit e241b73
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/util/util_runcmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ static void samba_runcmd_io_handler(struct tevent_context *ev,
DEBUG(0, ("Error in waitpid() unexpectedly got ECHILD "
"for %s child %d - %s, "
"someone has set SIGCHLD to SIG_IGN!\n",
state->arg0, state->pid, strerror(errno)));
state->arg0, (int)state->pid, strerror(errno)));
tevent_req_error(req, errno);
return;
}
Expand Down
4 changes: 2 additions & 2 deletions source3/modules/vfs_aio_fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ static int aio_child_destructor(struct aio_child *child)
SMB_ASSERT(!child->busy);

DEBUG(10, ("aio_child_destructor: removing child %d on fd %d\n",
child->pid, child->sockfd));
(int)child->pid, child->sockfd));

/*
* closing the sockfd makes the child not return from recvmsg() on RHEL
Expand Down Expand Up @@ -471,7 +471,7 @@ static int create_aio_child(struct smbd_server_connection *sconn,
}

DEBUG(10, ("Child %d created with sockfd %d\n",
result->pid, fdpair[0]));
(int)result->pid, fdpair[0]));

result->sockfd = fdpair[0];
close(fdpair[1]);
Expand Down
5 changes: 3 additions & 2 deletions source3/modules/vfs_fruit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1982,7 +1982,7 @@ static NTSTATUS check_ms_nfs(vfs_handle_struct *handle,
*pdo_chmod = true;

DEBUG(10, ("MS NFS chmod request %s, %04o\n",
fsp_str_dbg(fsp), *pmode));
fsp_str_dbg(fsp), (unsigned)(*pmode)));
break;
}
}
Expand Down Expand Up @@ -3439,7 +3439,8 @@ static NTSTATUS fruit_fset_nt_acl(vfs_handle_struct *handle,

if (result != 0) {
DEBUG(1, ("chmod: %s, result: %d, %04o error %s\n", fsp_str_dbg(fsp),
result, ms_nfs_mode, strerror(errno)));
result, (unsigned)ms_nfs_mode,
strerror(errno)));
status = map_nt_error_from_unix(errno);
return status;
}
Expand Down
3 changes: 2 additions & 1 deletion source3/rpc_server/fssd.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ void start_fssd(struct tevent_context *ev_ctx,
exit(1);
}

DEBUG(1, ("File Server Shadow-copy Daemon Started (%d)\n", getpid()));
DEBUG(1, ("File Server Shadow-copy Daemon Started (%d)\n",
(int)getpid()));

/* loop forever */
rc = tevent_loop_wait(ev_ctx);
Expand Down
9 changes: 5 additions & 4 deletions source4/smbd/process_standard.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,13 @@ static void standard_child_pipe_handler(struct tevent_context *ev,
DEBUG(0, ("Error in waitpid() unexpectedly got ECHILD "
"for child %d (%s) - %s, someone has set SIGCHLD "
"to SIG_IGN!\n",
state->pid, state->name, strerror(errno)));
(int)state->pid, state->name,
strerror(errno)));
TALLOC_FREE(state);
return;
}
DEBUG(0, ("Error in waitpid() for child %d (%s) - %s \n",
state->pid, state->name, strerror(errno)));
(int)state->pid, state->name, strerror(errno)));
if (errno == 0) {
errno = ECHILD;
}
Expand All @@ -119,11 +120,11 @@ static void standard_child_pipe_handler(struct tevent_context *ev,
if (WIFEXITED(status)) {
status = WEXITSTATUS(status);
DEBUG(2, ("Child %d (%s) exited with status %d\n",
state->pid, state->name, status));
(int)state->pid, state->name, status));
} else if (WIFSIGNALED(status)) {
status = WTERMSIG(status);
DEBUG(0, ("Child %d (%s) terminated with signal %d\n",
state->pid, state->name, status));
(int)state->pid, state->name, status));
}
TALLOC_FREE(state);
return;
Expand Down

0 comments on commit e241b73

Please sign in to comment.