From 5d4734dafffb9b81a095cc6ef38bf4fe58497320 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 21 Oct 2004 22:52:56 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=4383 --- checkin_notes | 8 ++++++++ client/app_control.C | 2 +- clientgui/ViewProjects.cpp | 2 +- lib/gui_rpc_client.C | 14 +++++++------- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/checkin_notes b/checkin_notes index a09f1a13c8..e3583b87fa 100755 --- a/checkin_notes +++ b/checkin_notes @@ -18724,3 +18724,11 @@ Rom 21 Oct 2004 (boinc) - Tag for 4.50 release, all platforms boinc_core_release_4_50 +David 21 Oct 2004 + - compile fix + To initialize a char[256], use strcpy(x, ""), not x[0] = NULL. + + client/ + app_control.C + lib/ + gui_rpc_client.C diff --git a/client/app_control.C b/client/app_control.C index 40daa3d2e6..fcf31b8d0f 100644 --- a/client/app_control.C +++ b/client/app_control.C @@ -446,7 +446,7 @@ bool ACTIVE_TASK::check_max_disk_exceeded() { // retval = current_disk_usage(disk_usage); if (retval) { - msg_printf(0, MSG_ERROR, "Can't get application disk usage"); + msg_printf(0, MSG_ERROR, "Can't get application disk usage: %d", retval); } else { if (disk_usage > max_disk_usage) { msg_printf( diff --git a/clientgui/ViewProjects.cpp b/clientgui/ViewProjects.cpp index 015f4a2f23..7858f41737 100644 --- a/clientgui/ViewProjects.cpp +++ b/clientgui/ViewProjects.cpp @@ -832,7 +832,7 @@ bool CViewProjects::IsWebsiteLink( const wxString& strLink ) wxInt32 CViewProjects::ConvertWebsiteIndexToLink( wxInt32 iProjectIndex, wxInt32 iWebsiteIndex, wxString& strLink ) { - strLink.Printf(wxT("%s:%d:%d"), LINK_WEB, iProjectIndex, iWebsiteIndex); + strLink.Printf(wxT("%s:%d:%d"), LINK_WEB.c_str(), iProjectIndex, iWebsiteIndex); return 0; } diff --git a/lib/gui_rpc_client.C b/lib/gui_rpc_client.C index df4de97d9f..07e7a750d1 100644 --- a/lib/gui_rpc_client.C +++ b/lib/gui_rpc_client.C @@ -577,12 +577,12 @@ int HOST_INFO::parse(MIOFILE& in) { void HOST_INFO::clear() { timezone = 0; - domain_name[0] = NULL; - serialnum[0] = NULL; - ip_addr[0] = NULL; + strcpy(domain_name, ""); + strcpy(serialnum, ""); + strcpy(ip_addr, ""); p_ncpus = 0; - p_vendor[0] = NULL; - p_model[0] = NULL; + strcpy(p_vendor, ""); + strcpy(p_model, ""); p_fpops = 0.0; p_iops = 0.0; p_membw = 0.0; @@ -590,8 +590,8 @@ void HOST_INFO::clear() { p_iop_err = 0; p_membw_err = 0; p_calculated = 0.0; - os_name[0] = NULL; - os_version[0] = NULL; + strcpy(os_name, ""); + strcpy(os_version, ""); m_nbytes = 0.0; m_cache = 0.0; m_swap = 0.0;