Silence unused variable/parameter warnings

sql-rework
Tomasz Golinski 2019-10-06 02:58:24 +02:00
rodzic 9d9601e4ca
commit 6ba1da6203
3 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -49,7 +49,7 @@ GPX::~GPX() {
delete root;
}
Caches GPX::get_user_caches(std::string uuid, int count) {
Caches GPX::get_user_caches(__attribute__((unused)) std::string uuid, __attribute__((unused)) int count) {
Caches list;
for (auto& el : items) {

Wyświetl plik

@ -176,9 +176,9 @@ bool OCdb::update_cache(json j) {
sql += i.first + ',';
sql.pop_back();
sql += ") VALUES ('" + code + "',";
for (auto& i : fields)
for (__attribute__((unused)) auto& i : fields)
sql += "?,";
for (auto& i : fields2)
for (__attribute__((unused)) auto& i : fields2)
sql += "?,";
sql.pop_back();
sql += ") ON CONFLICT(code) DO UPDATE SET ";
@ -233,7 +233,7 @@ bool OCdb::update_log(json j) {
sql += i.first + ',';
sql.pop_back();
sql += ") VALUES ('" + uuid + "',";
for (auto& i : fields)
for (__attribute__((unused)) auto& i : fields)
sql += "?,";
sql.pop_back();
sql += ") ON CONFLICT(uuid) DO UPDATE SET ";
@ -311,7 +311,7 @@ Caches OCdb::get_user_caches_not_found(std::string uuid) {
return cc;
}
Caches OCdb::get_user_caches(std::string uuid, int count) {
Caches OCdb::get_user_caches(std::string uuid, __attribute__((unused)) int count) {
int res;
Caches cc;
Cache c;

Wyświetl plik

@ -17,7 +17,7 @@ static const std::string OKAPI_username = "services/users/by_username";
static const std::string OKAPI_changelog = "services/replicate/changelog";
// Callback for cURL easy interface used to save received output to std::string object
size_t Okapi::write_cb(char* ptr, size_t size, size_t nmemb, void* userdata) {
size_t Okapi::write_cb(char* ptr, __attribute__((unused)) size_t size, size_t nmemb, void* userdata) {
std::string* str = reinterpret_cast<std::string*>(userdata);
str->append(ptr, nmemb);
return nmemb;