mirror of https://github.com/ecmwf/eccodes.git
C++ compiler warnings: conversion from string literal to 'char *'
This commit is contained in:
parent
4f084f050e
commit
6e39ecda5e
|
@ -27,7 +27,7 @@ static void usage(const char* prog)
|
|||
int main(int argc, char* argv[])
|
||||
{
|
||||
char* resource_path = NULL;
|
||||
char* resource_name = NULL;
|
||||
const char* resource_name = NULL;
|
||||
ResourceType resource_type = UNKNOWN;
|
||||
char* full_path = NULL;
|
||||
char* out_file = NULL;
|
||||
|
|
|
@ -58,7 +58,7 @@ int grib_tool_init(grib_runtime_options* options)
|
|||
{
|
||||
int opt = grib_options_on("C") + grib_options_on("O") + grib_options_on("D");
|
||||
|
||||
options->dump_mode = "default";
|
||||
options->dump_mode = (char*)"default";
|
||||
|
||||
|
||||
if (opt > 1) {
|
||||
|
@ -67,12 +67,12 @@ int grib_tool_init(grib_runtime_options* options)
|
|||
}
|
||||
|
||||
if (grib_options_on("O")) {
|
||||
options->dump_mode = "wmo";
|
||||
options->dump_mode = (char*)"wmo";
|
||||
options->dump_flags = GRIB_DUMP_FLAG_CODED | GRIB_DUMP_FLAG_OCTET | GRIB_DUMP_FLAG_VALUES | GRIB_DUMP_FLAG_READ_ONLY;
|
||||
}
|
||||
|
||||
if (grib_options_on("D")) {
|
||||
options->dump_mode = "debug";
|
||||
options->dump_mode = (char*)"debug";
|
||||
options->dump_flags = GRIB_DUMP_FLAG_VALUES | GRIB_DUMP_FLAG_READ_ONLY;
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ int grib_tool_init(grib_runtime_options* options)
|
|||
{
|
||||
int opt = grib_options_on("C") + grib_options_on("O") + grib_options_on("D");
|
||||
|
||||
options->dump_mode = "default";
|
||||
options->dump_mode = (char*)"default";
|
||||
|
||||
if (opt > 1) {
|
||||
printf("%s: simultaneous O/D options not allowed\n", tool_name);
|
||||
|
@ -64,22 +64,22 @@ int grib_tool_init(grib_runtime_options* options)
|
|||
}
|
||||
|
||||
if (grib_options_on("O")) {
|
||||
options->dump_mode = "wmo";
|
||||
options->dump_mode = (char*)"wmo";
|
||||
options->dump_flags = GRIB_DUMP_FLAG_CODED | GRIB_DUMP_FLAG_OCTET | GRIB_DUMP_FLAG_VALUES | GRIB_DUMP_FLAG_READ_ONLY;
|
||||
}
|
||||
|
||||
if (grib_options_on("D")) {
|
||||
options->dump_mode = "debug";
|
||||
options->dump_mode = (char*)"debug";
|
||||
options->dump_flags = GRIB_DUMP_FLAG_VALUES | GRIB_DUMP_FLAG_READ_ONLY;
|
||||
}
|
||||
|
||||
if (grib_options_on("J")) {
|
||||
options->dump_mode = "json";
|
||||
options->dump_mode = (char*)"json";
|
||||
options->dump_flags = GRIB_DUMP_FLAG_VALUES | GRIB_DUMP_FLAG_READ_ONLY;
|
||||
}
|
||||
|
||||
if (grib_options_on("X")) {
|
||||
options->dump_mode = "xml";
|
||||
options->dump_mode = (char*)"xml";
|
||||
options->dump_flags = GRIB_DUMP_FLAG_VALUES | GRIB_DUMP_FLAG_READ_ONLY;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue