Skip to content

Commit

Permalink
add casts to keep printf functions happy
Browse files Browse the repository at this point in the history
  • Loading branch information
ghewgill committed Jan 1, 2013
1 parent f7e1d5e commit e075369
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion demux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ int main(int argc, char *argv[])
exit(1);
}
if (w < n/nfds) {
fprintf(stderr, "short write: %d < %d\n", w, n/nfds);
fprintf(stderr, "short write: %d < %d\n", (int)w, (int)(n/nfds));
exit(1);
}
}
Expand Down
2 changes: 1 addition & 1 deletion emailer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void email(const eas::Message &message, const char fn[])
FILE *f = fdopen(pipeout[1], "w");
if (f != NULL) {
char boundary[80];
snprintf(boundary, sizeof(boundary), "%08x.%d", time(0), getpid());
snprintf(boundary, sizeof(boundary), "%08x.%d", (unsigned int)time(0), getpid());
fprintf(f, "To: %s\n", From);
fprintf(f, "From: %s\n", From);
string name = fn;
Expand Down
2 changes: 1 addition & 1 deletion splitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ int main(int argc, char *argv[])
exit(1);
}
if (w < n) {
fprintf(stderr, "short write: %d < %d\n", w, n);
fprintf(stderr, "short write: %d < %d\n", (int)w, (int)n);
exit(1);
}
}
Expand Down

0 comments on commit e075369

Please sign in to comment.