From: Maxim Mamontov Date: Thu, 26 May 2011 14:19:08 +0000 (+0300) Subject: Fix compiler warnings in unit-tests X-Git-Tag: 2.408-alpha~137 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/ce30e86822237a3523fd394943d50d010d70b701 Fix compiler warnings in unit-tests --- diff --git a/tests/testadmin.h b/tests/testadmin.h index 37d20b4a..2175dbb6 100644 --- a/tests/testadmin.h +++ b/tests/testadmin.h @@ -9,10 +9,10 @@ class TEST_ADMIN : public ADMIN { ADMIN & operator=(const ADMIN &) { return *this; } ADMIN & operator=(const ADMIN_CONF &) { return *this; } - bool operator==(const ADMIN & rhs) const { return true; } - bool operator!=(const ADMIN & rhs) const { return false; } - bool operator<(const ADMIN & rhs) const { return true; } - bool operator<=(const ADMIN & rhs) const { return true; } + bool operator==(const ADMIN & /*rhs*/) const { return true; } + bool operator!=(const ADMIN & /*rhs*/) const { return false; } + bool operator<(const ADMIN & /*rhs*/) const { return true; } + bool operator<=(const ADMIN & /*rhs*/) const { return true; } const std::string & GetPassword() const { return password; } const std::string & GetLogin() const { return login; } diff --git a/tests/teststore.h b/tests/teststore.h index 23fe6595..1ebc671f 100644 --- a/tests/teststore.h +++ b/tests/teststore.h @@ -7,70 +7,70 @@ class TEST_STORE : public STORE { public: TEST_STORE() {} - int GetUsersList(std::vector * usersList) const { return 0; } - int AddUser(const std::string & login) const { return 0; } - int DelUser(const std::string & login) const { return 0; } - int SaveUserStat(const USER_STAT & stat, const std::string & login) const { return 0; } - int SaveUserConf(const USER_CONF & conf, const std::string & login) const { return 0; } - int RestoreUserStat(USER_STAT * stat, const std::string & login) const { return 0; } - int RestoreUserConf(USER_CONF * conf, const std::string & login) const { return 0; } - - int WriteUserChgLog(const std::string & login, - const std::string & admLogin, - uint32_t admIP, - const std::string & paramName, - const std::string & oldValue, - const std::string & newValue, - const std::string & message = "") const { return 0; } - - int WriteUserConnect(const std::string & login, uint32_t ip) const { return 0; } - - int WriteUserDisconnect(const std::string & login, - const DIR_TRAFF & up, - const DIR_TRAFF & down, - const DIR_TRAFF & sessionUp, - const DIR_TRAFF & sessionDown, - double cash, - double freeMb, - const std::string & reason) const { return 0; } - - int WriteDetailedStat(const TRAFF_STAT & statTree, - time_t lastStat, - const std::string & login) const { return 0; } - - int AddMessage(STG_MSG * msg, const std::string & login) const { return 0; } - int EditMessage(const STG_MSG & msg, const std::string & login) const { return 0; } - int GetMessage(uint64_t id, STG_MSG * msg, const std::string & login) const { return 0; } - int DelMessage(uint64_t id, const std::string & login) const { return 0; } - int GetMessageHdrs(vector * hdrsList, const std::string & login) const { return 0; } - - int SaveMonthStat(const USER_STAT & stat, int month, int year, const std::string & login) const { return 0; } - - int GetAdminsList(std::vector * adminsList) const { return 0; } - int SaveAdmin(const ADMIN_CONF & ac) const { return 0; } - int RestoreAdmin(ADMIN_CONF * ac, const std::string & login) const { return 0; } - int AddAdmin(const std::string & login) const { return 0; } - int DelAdmin(const std::string & login) const { return 0; } - - int GetTariffsList(std::vector * tariffsList) const { return 0; } - int AddTariff(const std::string & name) const { return 0; } - int DelTariff(const std::string & name) const { return 0; } - int SaveTariff(const TARIFF_DATA & td, const std::string & tariffName) const { return 0; } - int RestoreTariff(TARIFF_DATA * td, const std::string & tariffName) const { return 0; } - - int GetCorpsList(std::vector * corpsList) const { return 0; } - int SaveCorp(const CORP_CONF & cc) const { return 0; } - int RestoreCorp(CORP_CONF * cc, const std::string & name) const { return 0; } - int AddCorp(const std::string & name) const { return 0; } - int DelCorp(const std::string & name) const { return 0; } - - int GetServicesList(std::vector * corpsList) const { return 0; } - int SaveService(const SERVICE_CONF & sc) const { return 0; } - int RestoreService(SERVICE_CONF * sc, const std::string & name) const { return 0; } - int AddService(const std::string & name) const { return 0; } - int DelService(const std::string & name) const { return 0; } - - void SetSettings(const MODULE_SETTINGS & s) {} + int GetUsersList(std::vector * /*usersList*/) const { return 0; } + int AddUser(const std::string & /*login*/) const { return 0; } + int DelUser(const std::string & /*login*/) const { return 0; } + int SaveUserStat(const USER_STAT & /*stat*/, const std::string & /*login*/) const { return 0; } + int SaveUserConf(const USER_CONF & /*conf*/, const std::string & /*login*/) const { return 0; } + int RestoreUserStat(USER_STAT * /*stat*/, const std::string & /*login*/) const { return 0; } + int RestoreUserConf(USER_CONF * /*conf*/, const std::string & /*login*/) const { return 0; } + + int WriteUserChgLog(const std::string & /*login*/, + const std::string & /*admLogin*/, + uint32_t /*admIP*/, + const std::string & /*paramName*/, + const std::string & /*oldValue*/, + const std::string & /*newValue*/, + const std::string & /*message*/) const { return 0; } + + int WriteUserConnect(const std::string & /*login*/, uint32_t /*ip*/) const { return 0; } + + int WriteUserDisconnect(const std::string & /*login*/, + const DIR_TRAFF & /*up*/, + const DIR_TRAFF & /*down*/, + const DIR_TRAFF & /*sessionUp*/, + const DIR_TRAFF & /*sessionDown*/, + double /*cash*/, + double /*freeMb*/, + const std::string & /*reason*/) const { return 0; } + + int WriteDetailedStat(const TRAFF_STAT & /*statTree*/, + time_t /*lastStat*/, + const std::string & /*login*/) const { return 0; } + + int AddMessage(STG_MSG * /*msg*/, const std::string & /*login*/) const { return 0; } + int EditMessage(const STG_MSG & /*msg*/, const std::string & /*login*/) const { return 0; } + int GetMessage(uint64_t /*id*/, STG_MSG * /*msg*/, const std::string & /*login*/) const { return 0; } + int DelMessage(uint64_t /*id*/, const std::string & /*login*/) const { return 0; } + int GetMessageHdrs(vector * /*hdrsList*/, const std::string & /*login*/) const { return 0; } + + int SaveMonthStat(const USER_STAT & /*stat*/, int /*month*/, int /*year*/, const std::string & /*login*/) const { return 0; } + + int GetAdminsList(std::vector * /*adminsList*/) const { return 0; } + int SaveAdmin(const ADMIN_CONF & /*ac*/) const { return 0; } + int RestoreAdmin(ADMIN_CONF * /*ac*/, const std::string & /*login*/) const { return 0; } + int AddAdmin(const std::string & /*login*/) const { return 0; } + int DelAdmin(const std::string & /*login*/) const { return 0; } + + int GetTariffsList(std::vector * /*tariffsList*/) const { return 0; } + int AddTariff(const std::string & /*name*/) const { return 0; } + int DelTariff(const std::string & /*name*/) const { return 0; } + int SaveTariff(const TARIFF_DATA & /*td*/, const std::string & /*tariffName*/) const { return 0; } + int RestoreTariff(TARIFF_DATA * /*td*/, const std::string & /*tariffName*/) const { return 0; } + + int GetCorpsList(std::vector * /*corpsList*/) const { return 0; } + int SaveCorp(const CORP_CONF & /*cc*/) const { return 0; } + int RestoreCorp(CORP_CONF * /*cc*/, const std::string & /*name*/) const { return 0; } + int AddCorp(const std::string & /*name*/) const { return 0; } + int DelCorp(const std::string & /*name*/) const { return 0; } + + int GetServicesList(std::vector * /*corpsList*/) const { return 0; } + int SaveService(const SERVICE_CONF & /*sc*/) const { return 0; } + int RestoreService(SERVICE_CONF * /*sc*/, const std::string & /*name*/) const { return 0; } + int AddService(const std::string & /*name*/) const { return 0; } + int DelService(const std::string & /*name*/) const { return 0; } + + void SetSettings(const MODULE_SETTINGS & /*s*/) {} int ParseSettings() { return 0; } const std::string & GetStrError() const { return strError; } const std::string & GetVersion() const { return version; } diff --git a/tests/testtariffs.h b/tests/testtariffs.h index 68279aca..e2651814 100644 --- a/tests/testtariffs.h +++ b/tests/testtariffs.h @@ -10,14 +10,14 @@ class TEST_TARIFFS : public TARIFFS { TEST_TARIFFS() {} int ReadTariffs () { return 0; } - const TARIFF * FindByName(const std::string & name) const { return &testTariff; } + const TARIFF * FindByName(const std::string & /*name*/) const { return &testTariff; } const TARIFF * GetNoTariff() const { return NULL; } int GetTariffsNum() const { return 0; } - int Del(const std::string & name, const ADMIN * admin) { return 0; } - int Add(const std::string & name, const ADMIN * admin) { return 0; } - int Chg(const TARIFF_DATA & td, const ADMIN * admin) { return 0; } + int Del(const std::string & /*name*/, const ADMIN * /*admin*/) { return 0; } + int Add(const std::string & /*name*/, const ADMIN * /*admin*/) { return 0; } + int Chg(const TARIFF_DATA & /*td*/, const ADMIN * /*admin*/) { return 0; } - void GetTariffsData(std::list * tdl) {} + void GetTariffsData(std::list * /*tdl*/) {} const std::string & GetStrError() const { return strError; }