don't leak warning suppression out of protobuf

develop
Myk Taylor 2023-06-25 17:53:16 -07:00
parent 8f1efcd8a3
commit 78448f438d
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
4 changed files with 20 additions and 20 deletions

@ -6,14 +6,10 @@ add_subdirectory(protobuf)
if(UNIX) if(UNIX)
set_target_properties(lua PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations -Wno-deprecated-enum-enum-conversion") set_target_properties(lua PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations -Wno-deprecated-enum-enum-conversion")
target_compile_options(protoc set_target_properties(protoc PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations -Wno-restrict")
PUBLIC -Wno-deprecated-declarations -Wno-restrict) set_target_properties(protoc-bin PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations -Wno-restrict")
target_compile_options(protoc-bin set_target_properties(protobuf-lite PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations -Wno-restrict")
PUBLIC -Wno-deprecated-declarations -Wno-restrict) set_target_properties(protobuf PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations -Wno-restrict")
target_compile_options(protobuf-lite
PUBLIC -Wno-deprecated-declarations -Wno-restrict)
target_compile_options(protobuf
PUBLIC -Wno-deprecated-declarations -Wno-restrict)
endif() endif()
if(UNIX AND NOT APPLE) # remove this once our MSVC build env has been updated if(UNIX AND NOT APPLE) # remove this once our MSVC build env has been updated

@ -46,6 +46,10 @@
#ifndef GOOGLE_PROTOBUF_REPEATED_FIELD_H__ #ifndef GOOGLE_PROTOBUF_REPEATED_FIELD_H__
#define GOOGLE_PROTOBUF_REPEATED_FIELD_H__ #define GOOGLE_PROTOBUF_REPEATED_FIELD_H__
#ifdef __GNUC__
#pragma GCC system_header
#endif
#include <string> #include <string>
#include <iterator> #include <iterator>
#include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/common.h>

@ -213,12 +213,12 @@ std::string pointer_identity::getFullName()
std::string container_identity::getFullName(type_identity *item) std::string container_identity::getFullName(type_identity *item)
{ {
return "<" + (item ? item->getFullName() : std::string("void")) + ">"; return '<' + (item ? item->getFullName() : std::string("void")) + '>';
} }
std::string ptr_container_identity::getFullName(type_identity *item) std::string ptr_container_identity::getFullName(type_identity *item)
{ {
return "<" + (item ? item->getFullName() : std::string("void")) + "*>"; return '<' + (item ? item->getFullName() : std::string("void")) + std::string("*>");
} }
std::string bit_container_identity::getFullName(type_identity *) std::string bit_container_identity::getFullName(type_identity *)

@ -182,23 +182,23 @@ DEFINE_GET_FOCUS_STRING_HANDLER(dwarfmode)
if (game->main_interface.info.open) { if (game->main_interface.info.open) {
newFocusString = baseFocus; newFocusString = baseFocus;
newFocusString += "/Info"; newFocusString += "/Info";
newFocusString += "/" + enum_item_key(game->main_interface.info.current_mode); newFocusString += '/' + enum_item_key(game->main_interface.info.current_mode);
switch(game->main_interface.info.current_mode) { switch(game->main_interface.info.current_mode) {
case df::enums::info_interface_mode_type::CREATURES: case df::enums::info_interface_mode_type::CREATURES:
newFocusString += "/" + enum_item_key(game->main_interface.info.creatures.current_mode); newFocusString += '/' + enum_item_key(game->main_interface.info.creatures.current_mode);
break; break;
case df::enums::info_interface_mode_type::BUILDINGS: case df::enums::info_interface_mode_type::BUILDINGS:
newFocusString += "/" + enum_item_key(game->main_interface.info.buildings.mode); newFocusString += '/' + enum_item_key(game->main_interface.info.buildings.mode);
break; break;
case df::enums::info_interface_mode_type::LABOR: case df::enums::info_interface_mode_type::LABOR:
newFocusString += "/" + enum_item_key(game->main_interface.info.labor.mode); newFocusString += '/' + enum_item_key(game->main_interface.info.labor.mode);
break; break;
case df::enums::info_interface_mode_type::ARTIFACTS: case df::enums::info_interface_mode_type::ARTIFACTS:
newFocusString += "/" + enum_item_key(game->main_interface.info.artifacts.mode); newFocusString += '/' + enum_item_key(game->main_interface.info.artifacts.mode);
break; break;
case df::enums::info_interface_mode_type::JUSTICE: case df::enums::info_interface_mode_type::JUSTICE:
newFocusString += "/" + enum_item_key(game->main_interface.info.justice.current_mode); newFocusString += '/' + enum_item_key(game->main_interface.info.justice.current_mode);
break; break;
default: default:
break; break;
@ -209,7 +209,7 @@ DEFINE_GET_FOCUS_STRING_HANDLER(dwarfmode)
if (game->main_interface.view_sheets.open) { if (game->main_interface.view_sheets.open) {
newFocusString = baseFocus; newFocusString = baseFocus;
newFocusString += "/ViewSheets"; newFocusString += "/ViewSheets";
newFocusString += "/" + enum_item_key(game->main_interface.view_sheets.active_sheet); newFocusString += '/' + enum_item_key(game->main_interface.view_sheets.active_sheet);
focusStrings.push_back(newFocusString); focusStrings.push_back(newFocusString);
} }
@ -233,7 +233,7 @@ DEFINE_GET_FOCUS_STRING_HANDLER(dwarfmode)
newFocusString += "/Zone"; newFocusString += "/Zone";
if (game->main_interface.civzone.cur_bld) { if (game->main_interface.civzone.cur_bld) {
newFocusString += "/Some"; newFocusString += "/Some";
newFocusString += "/" + enum_item_key(game->main_interface.civzone.cur_bld->type); newFocusString += '/' + enum_item_key(game->main_interface.civzone.cur_bld->type);
} }
break; break;
case df::enums::main_bottom_mode_type::ZONE_PAINT: case df::enums::main_bottom_mode_type::ZONE_PAINT:
@ -499,7 +499,7 @@ DEFINE_GET_FOCUS_STRING_HANDLER(dungeonmode)
if (!adventure) if (!adventure)
return; return;
focus += "/" + enum_item_key(adventure->menu); focus += '/' + enum_item_key(adventure->menu);
} }
*/ */
@ -1427,7 +1427,7 @@ DFHACK_EXPORT int Gui::makeAnnouncement(df::announcement_type type, df::announce
if (flags.bits.D_DISPLAY) if (flags.bits.D_DISPLAY)
{ {
world->status.display_timer = ANNOUNCE_DISPLAY_TIME; world->status.display_timer = ANNOUNCE_DISPLAY_TIME;
Gui::writeToGamelog("x" + to_string(repeat_count + 1)); Gui::writeToGamelog('x' + to_string(repeat_count + 1));
} }
return -1; return -1;
} }