Browse Source

dont return nullptr on some functions, for -Wformat-overflow

Signed-off-by: falkTX <falktx@falktx.com>
pull/1780/head
falkTX 1 year ago
parent
commit
ad7def4bd0
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 16 additions and 16 deletions
  1. +13
    -13
      source/utils/CarlaBackendUtils.hpp
  2. +3
    -3
      source/utils/CarlaBridgeUtils.hpp

+ 13
- 13
source/utils/CarlaBackendUtils.hpp View File

@@ -51,7 +51,7 @@ const char* PluginOption2Str(const uint option) noexcept
} }


carla_stderr("CarlaBackend::PluginOption2Str(%i) - invalid option", option); carla_stderr("CarlaBackend::PluginOption2Str(%i) - invalid option", option);
return nullptr;
return "";
} }


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@@ -76,7 +76,7 @@ const char* BinaryType2Str(const BinaryType type) noexcept
} }


carla_stderr("CarlaBackend::BinaryType2Str(%i) - invalid type", type); carla_stderr("CarlaBackend::BinaryType2Str(%i) - invalid type", type);
return nullptr;
return "";
} }


static inline static inline
@@ -93,7 +93,7 @@ const char* FileType2Str(const FileType type) noexcept
} }


carla_stderr("CarlaBackend::FileType2Str(%i) - invalid type", type); carla_stderr("CarlaBackend::FileType2Str(%i) - invalid type", type);
return nullptr;
return "";
} }


static inline static inline
@@ -136,7 +136,7 @@ const char* PluginType2Str(const PluginType type) noexcept
} }


carla_stderr("CarlaBackend::PluginType2Str(%i) - invalid type", type); carla_stderr("CarlaBackend::PluginType2Str(%i) - invalid type", type);
return nullptr;
return "";
} }


static inline static inline
@@ -167,7 +167,7 @@ const char* PluginCategory2Str(const PluginCategory category) noexcept
} }


carla_stderr("CarlaBackend::PluginCategory2Str(%i) - invalid category", category); carla_stderr("CarlaBackend::PluginCategory2Str(%i) - invalid category", category);
return nullptr;
return "";
} }


static inline static inline
@@ -184,7 +184,7 @@ const char* ParameterType2Str(const ParameterType type) noexcept
} }


carla_stderr("CarlaBackend::ParameterType2Str(%i) - invalid type", type); carla_stderr("CarlaBackend::ParameterType2Str(%i) - invalid type", type);
return nullptr;
return "";
} }


static inline static inline
@@ -215,7 +215,7 @@ const char* InternalParameterIndex2Str(const InternalParameterIndex index) noexc
} }


carla_stderr("CarlaBackend::InternalParameterIndex2Str(%i) - invalid index", index); carla_stderr("CarlaBackend::InternalParameterIndex2Str(%i) - invalid index", index);
return nullptr;
return "";
} }


static inline static inline
@@ -328,7 +328,7 @@ const char* EngineCallbackOpcode2Str(const EngineCallbackOpcode opcode) noexcept
} }


carla_stderr("CarlaBackend::EngineCallbackOpcode2Str(%i) - invalid opcode", opcode); carla_stderr("CarlaBackend::EngineCallbackOpcode2Str(%i) - invalid opcode", opcode);
return nullptr;
return "";
} }


static inline static inline
@@ -417,7 +417,7 @@ const char* EngineOption2Str(const EngineOption option) noexcept
} }


carla_stderr("CarlaBackend::EngineOption2Str(%i) - invalid option", option); carla_stderr("CarlaBackend::EngineOption2Str(%i) - invalid option", option);
return nullptr;
return "";
} }


static inline static inline
@@ -438,7 +438,7 @@ const char* EngineProcessMode2Str(const EngineProcessMode mode) noexcept
} }


carla_stderr("CarlaBackend::EngineProcessMode2Str(%i) - invalid mode", mode); carla_stderr("CarlaBackend::EngineProcessMode2Str(%i) - invalid mode", mode);
return nullptr;
return "";
} }


static inline static inline
@@ -459,7 +459,7 @@ const char* EngineTransportMode2Str(const EngineTransportMode mode) noexcept
} }


carla_stderr("CarlaBackend::EngineTransportMode2Str(%i) - invalid mode", mode); carla_stderr("CarlaBackend::EngineTransportMode2Str(%i) - invalid mode", mode);
return nullptr;
return "";
} }


static inline static inline
@@ -476,7 +476,7 @@ const char* FileCallbackOpcode2Str(const FileCallbackOpcode opcode) noexcept
} }


carla_stderr("CarlaBackend::FileCallbackOpcode2Str(%i) - invalid opcode", opcode); carla_stderr("CarlaBackend::FileCallbackOpcode2Str(%i) - invalid opcode", opcode);
return nullptr;
return "";
} }


static inline static inline
@@ -499,7 +499,7 @@ const char* PatchbayIcon2Str(const PatchbayIcon icon) noexcept
} }


carla_stderr("CarlaBackend::PatchbayIcon2Str(%i) - invalid icon", icon); carla_stderr("CarlaBackend::PatchbayIcon2Str(%i) - invalid icon", icon);
return nullptr;
return "";
} }


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------


+ 3
- 3
source/utils/CarlaBridgeUtils.hpp View File

@@ -59,7 +59,7 @@ const char* PluginBridgeRtClientOpcode2str(const PluginBridgeRtClientOpcode opco
} }


carla_stderr("CarlaBackend::PluginBridgeRtClientOpcode2str(%i) - invalid opcode", opcode); carla_stderr("CarlaBackend::PluginBridgeRtClientOpcode2str(%i) - invalid opcode", opcode);
return nullptr;
return "";
} }


static inline static inline
@@ -134,7 +134,7 @@ const char* PluginBridgeNonRtClientOpcode2str(const PluginBridgeNonRtClientOpcod
} }


carla_stderr("CarlaBackend::PluginBridgeNonRtClientOpcode2str(%i) - invalid opcode", opcode); carla_stderr("CarlaBackend::PluginBridgeNonRtClientOpcode2str(%i) - invalid opcode", opcode);
return nullptr;
return "";
} }


static inline static inline
@@ -211,7 +211,7 @@ const char* PluginBridgeNonRtServerOpcode2str(const PluginBridgeNonRtServerOpcod
} }


carla_stderr("CarlaBackend::PluginBridgeNonRtServerOpcode2str%i) - invalid opcode", opcode); carla_stderr("CarlaBackend::PluginBridgeNonRtServerOpcode2str%i) - invalid opcode", opcode);
return nullptr;
return "";
} }


// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------


Loading…
Cancel
Save