1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-23 17:33:56 +03:00

Fix compilation warnings with gcc 4.1.2 (CentOS 5.4). Patch by Charles Loomis

This commit is contained in:
Ruben S. Montero 2010-09-02 20:26:51 +02:00
parent 381f26d52b
commit f12a1b6e1c
24 changed files with 43 additions and 34 deletions

View File

@ -217,4 +217,5 @@ private:
static int dump(ostringstream& oss, int num, char **names, char **values);
};
#endif /*HISTORY_H_*/
#endif /*HISTORY_H_*/

View File

@ -126,4 +126,5 @@ public:
};
#endif
#endif /*MYSQL_DB_H_*/
#endif /*MYSQL_DB_H_*/

View File

@ -68,4 +68,5 @@ protected:
SqlDB * db) = 0;
};
#endif /*OBJECT_SQL_H_*/
#endif /*OBJECT_SQL_H_*/

View File

@ -106,4 +106,5 @@ private:
};
#endif /*RANGED_LEASES_H_*/
#endif /*RANGED_LEASES_H_*/

View File

@ -282,7 +282,7 @@ private:
break;
}
if ( rc != (int)NULL )
if ( rc != 0 )
{
oss << " Returned error code [" << rc << "].";
}

View File

@ -186,4 +186,5 @@ private:
int init_cb(void *nil, int num, char **values, char **names);
};
#endif /*USER_POOL_H_*/
#endif /*USER_POOL_H_*/

View File

@ -51,7 +51,7 @@ public:
{
UNINITIALIZED = -1,
RANGED = 0,
FIXED = 1,
FIXED = 1
};
// *************************************************************************

View File

@ -181,7 +181,7 @@ void AuthRequest::add_auth(Object ob,
self_authorize = self_authorize && auth;
auths.push_back(oss.str());
};
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
@ -228,7 +228,7 @@ int AuthManager::start()
rc = pthread_create(&authm_thread,&pattr,authm_action_loop,(void *) this);
return rc;
};
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */

View File

@ -180,4 +180,5 @@ string VectorAttribute::vector_value(const char *name) const
{
return it->second;
}
};
}

View File

@ -55,7 +55,7 @@ int DispatchManager::start()
rc = pthread_create(&dm_thread,&pattr,dm_action_loop,(void *) this);
return rc;
};
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */

View File

@ -102,7 +102,7 @@ int HookManager::start()
rc = pthread_create(&hm_thread,&pattr,hm_action_loop,(void *) this);
return rc;
};
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */

View File

@ -42,7 +42,7 @@ void HookManagerDriver::execute(
}
write(oss);
};
}
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
@ -69,7 +69,7 @@ void HookManagerDriver::execute(
}
write(oss);
};
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */

View File

@ -42,10 +42,10 @@ Host::Host(
last_monitored(0),
cluster(ClusterPool::DEFAULT_CLUSTER_NAME),
host_template(id)
{};
{}
Host::~Host(){};
Host::~Host(){}
/* ************************************************************************ */
/* Host :: Database Access Functions */
@ -423,7 +423,7 @@ ostream& operator<<(ostream& os, Host& host)
os << host.to_xml(host_str);
return os;
};
}
/* ------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------ */

View File

@ -271,7 +271,7 @@ ostream& operator<<(ostream& os, HostShare& hs)
os << hs.to_xml(str);
return os;
};
}
/* ------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------ */

View File

@ -99,7 +99,7 @@ int InformationManager::start()
rc = pthread_create(&im_thread,&pattr,im_action_loop,(void *) this);
return rc;
};
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */

View File

@ -32,7 +32,7 @@ void InformationManagerDriver::monitor (
os << "MONITOR " << oid << " " << host << endl;
write(os);
};
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */

View File

@ -50,7 +50,7 @@ Image::Image(int _uid, ImageTemplate * _image_template):
{
image_template = new ImageTemplate;
}
};
}
Image::~Image()
{
@ -58,7 +58,7 @@ Image::~Image()
{
delete image_template;
}
};
}
/* ************************************************************************ */
/* Image :: Database Access Functions */
@ -415,8 +415,7 @@ ostream& operator<<(ostream& os, Image& image)
os << image.to_xml(image_str);
return os;
};
}
/* ------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------ */

View File

@ -55,7 +55,7 @@ int LifeCycleManager::start()
rc = pthread_create(&lcm_thread,&pattr,lcm_action_loop,(void *) this);
return rc;
};
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */

View File

@ -50,7 +50,7 @@ FileLog::FileLog(const string& file_name,
{
file.close();
}
};
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */

View File

@ -23,4 +23,5 @@
Log * NebulaLog::logger;
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */

View File

@ -164,11 +164,12 @@ int Mad::start()
if ( sudo_execution == true )
{
rc = execlp("sudo","sudo","-H","-u",owner,executable,arguments,NULL);
rc = execlp("sudo","sudo","-H","-u",owner,executable,arguments,
(char *) NULL);
}
else
{
rc = execlp(executable,executable,arguments,NULL);
rc = execlp(executable,executable,arguments,(char*)NULL);
}
goto error_exec;

View File

@ -29,7 +29,7 @@
MadManager::MadManager(vector<const Attribute*>& _mads):mad_conf(_mads)
{
pthread_mutex_init(&mutex,0);
};
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
@ -37,7 +37,7 @@ MadManager::MadManager(vector<const Attribute*>& _mads):mad_conf(_mads)
MadManager::~MadManager()
{
pthread_mutex_destroy(&mutex);
};
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
@ -66,7 +66,7 @@ void MadManager::mad_manager_system_init()
sigemptyset(&act.sa_mask);
sigaction(SIGPIPE,&act,NULL);
};
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
@ -335,4 +335,4 @@ void MadManager::listener()
}
}
}
};
}

View File

@ -109,4 +109,5 @@ error_common:
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */

View File

@ -683,3 +683,4 @@ int VirtualNetwork::nic_attribute(VectorAttribute *nic, int vid)
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */