Fix various warnings (#4950)

This commit is contained in:
Guillaume Chatelet
2025-12-15 13:53:03 +01:00
committed by Corentin Le Molgat
parent b6883f0efc
commit ae82a37616
6 changed files with 15 additions and 2 deletions

View File

@@ -62,7 +62,8 @@ class SolverInterface {
// All parameters that can't be exchanged with another process. The caller
// keeps ownership of non_streamable.
const NonStreamableSolverInitArguments* non_streamable = nullptr;
const NonStreamableSolverInitArguments* absl_nullable non_streamable =
nullptr;
};
// A callback function (if non null) for messages emitted by the solver.

View File

@@ -927,7 +927,10 @@ cc_library(
name = "remote_streaming_mode",
srcs = ["remote_streaming_mode.cc"],
hdrs = ["remote_streaming_mode.h"],
deps = ["@abseil-cpp//absl/strings:string_view"],
deps = [
"@abseil-cpp//absl/base:core_headers",
"@abseil-cpp//absl/strings:string_view",
],
)
cc_test(

View File

@@ -16,6 +16,7 @@
#include <ostream>
#include <string>
#include "absl/base/optimization.h"
#include "absl/strings/string_view.h"
namespace operations_research::math_opt {
@@ -29,6 +30,7 @@ std::string AbslUnparseFlag(const RemoteStreamingSolveMode value) {
case RemoteStreamingSolveMode::kInProcess:
return "inprocess";
}
ABSL_UNREACHABLE();
}
bool AbslParseFlag(const absl::string_view text,

View File

@@ -34,6 +34,7 @@ cc_library(
hdrs = ["gen_c.h"],
deps = [
":gen",
"@abseil-cpp//absl/base:core_headers",
"@abseil-cpp//absl/log:check",
"@abseil-cpp//absl/strings",
"@abseil-cpp//absl/strings:str_format",
@@ -54,6 +55,7 @@ cc_library(
hdrs = ["gen_python.h"],
deps = [
":gen",
"@abseil-cpp//absl/base:core_headers",
"@abseil-cpp//absl/strings",
"@abseil-cpp//absl/strings:str_format",
"@abseil-cpp//absl/strings:string_view",

View File

@@ -16,6 +16,7 @@
#include <memory>
#include <string>
#include "absl/base/optimization.h"
#include "absl/log/check.h"
#include "absl/strings/ascii.h"
#include "absl/strings/str_cat.h"
@@ -60,6 +61,7 @@ absl::string_view GetCTypeName(
case CodegenAttrTypeDescriptor::ValueType::kDouble:
return "double";
}
ABSL_UNREACHABLE();
}
// Turns an element/attribute name (e.g. "some_name") into a camel case name

View File

@@ -17,6 +17,7 @@
#include <set>
#include <string>
#include "absl/base/optimization.h"
#include "absl/strings/ascii.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
@@ -55,6 +56,7 @@ absl::string_view GetAttrPyValueType(
case CodegenAttrTypeDescriptor::ValueType::kDouble:
return "float";
}
ABSL_UNREACHABLE();
}
// Returns the python type for the given value type.
@@ -68,6 +70,7 @@ absl::string_view GetAttrNumpyValueType(
case CodegenAttrTypeDescriptor::ValueType::kDouble:
return "np.float64";
}
ABSL_UNREACHABLE();
}
class PythonEnumsGenerator : public CodeGenerator {