From f1c7b6a97d3d4a41271c648da2f1483e9f9a165c Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 20 May 2013 12:58:52 -0700 Subject: [PATCH] fix some Clang warnings; from Steffen Moeller --- clientgui/MainDocument.cpp | 2 +- lib/Makefile.am | 4 ++-- tools/dir_hier_move.cpp | 4 ++-- tools/dir_hier_path.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp index beeaf1d979..fd98f5f7a5 100644 --- a/clientgui/MainDocument.cpp +++ b/clientgui/MainDocument.cpp @@ -1645,7 +1645,7 @@ void CMainDocument::KillGraphicsApp(HANDLE pid) { void CMainDocument::KillGraphicsApp(int pid) { char* argv[6]; char currentDir[1024]; - char thePIDbuf[10]; + char thePIDbuf[20]; int id, iRetVal; diff --git a/lib/Makefile.am b/lib/Makefile.am index 8591b24042..725bb4497d 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -147,13 +147,13 @@ libboinc_la_SOURCES = $(generic_sources) $(mac_sources) libboinc_la_CFLAGS = $(AM_CFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS) libboinc_la_CXXFLAGS = $(AM_CXXFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS) libboinc_la_LDFLAGS = -L$(libdir) -rpath $(libdir) -static -version-number $(LIBBOINC_VERSION) -libboinc_la_LIBADD = +libboinc_la_LIBADD = -lm -lstdc++ libboinc_crypt_la_SOURCES = crypt.cpp libboinc_crypt_la_CFLAGS = $(AM_CFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS) $(SSL_CFLAGS) libboinc_crypt_la_CXXFLAGS = $(AM_CXXFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS) $(SSL_CXXFLAGS) libboinc_crypt_la_LDFLAGS = -L$(libdir) -rpath $(libdir) -static -version-number $(LIBBOINC_VERSION) -libboinc_crypt_la_LIBADD = +libboinc_crypt_la_LIBADD = -lm -lstdc++ if ENABLE_FCGI diff --git a/tools/dir_hier_move.cpp b/tools/dir_hier_move.cpp index 9d80f85471..334d16d52a 100644 --- a/tools/dir_hier_move.cpp +++ b/tools/dir_hier_move.cpp @@ -43,14 +43,14 @@ int main(int argc, char** argv) { int retval; if ( (argc == 1) || !strcmp(argv[1], "-h") || !strcmp(argv[1],"--help") || (argc != 4) ) { - fprintf(stderr, usage); + fprintf(stderr, "%s", usage); exit(1); } src_dir = argv[1]; dst_dir = argv[2]; fanout = atoi(argv[3]); if (!fanout) { - fprintf(stderr, usage); + fprintf(stderr, "%s", usage); exit(1); } diff --git a/tools/dir_hier_path.cpp b/tools/dir_hier_path.cpp index 3900ed458b..30d4d30e9b 100644 --- a/tools/dir_hier_path.cpp +++ b/tools/dir_hier_path.cpp @@ -42,7 +42,7 @@ int main(int argc, char** argv) { int retval; if ( (argc == 1) || !strcmp(argv[1], "-h") || !strcmp(argv[1],"--help") || (argc != 2) ) { - fprintf(stderr, usage); + fprintf(stderr, "%s", usage); exit(1); }