Compiler warnings

This commit is contained in:
shahramn 2024-12-04 13:53:58 +01:00
parent 68f347e79f
commit 7c9f046531
1 changed files with 4 additions and 4 deletions

View File

@ -245,7 +245,7 @@ const char* get_key(const std::string& name, codes_handle* h)
const std::string name;
const char* key;
const std::unique_ptr<const Condition> condition;
P(const std::string _name, const char* _key, const Condition* _condition = nullptr) :
P(const std::string& _name, const char* _key, const Condition* _condition = nullptr) :
name(_name), key(_key), condition(_condition) {}
};
@ -1076,8 +1076,8 @@ void GribSpec::json(eckit::JSON& j) const
}
if (type == CODES_TYPE_STRING) {
size_t length = 1024;
char value[length];
char value[1024] = {0,};
size_t length = sizeof(value);
CHECK_CALL(codes_get_string(handle_, name, value, &length));
j << name << value;
continue;