Skip to content

Commit

Permalink
Fix release build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
PixlOne committed May 2, 2023
1 parent 7bb0e46 commit 3b19a11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/common_gdbus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ variant_type::variant_type(const std::type_info& primitive) {
else if(primitive == typeid(bool))
type = G_VARIANT_TYPE_BOOLEAN;
else
assert(!"Invalid GVariant type");
throw std::runtime_error("Invalid GVariant type");
data = g_type_to_any(g_variant_type_copy(type));
}

Expand Down
5 changes: 3 additions & 2 deletions src/server_gdbus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ struct server::internal {
return g_variant_new_array(nullptr, raw_array.get(), map.size());
} else {
// This should not happen
assert(!"converted unhandled variant type");
throw std::runtime_error("converted unhandled variant type");
}
}

Expand Down Expand Up @@ -478,6 +478,7 @@ struct server::internal {
G_DBUS_ERROR_FAILED,
"Internal error");
assert(!"method call on non-existent server");
return nullptr;
}
}

Expand Down Expand Up @@ -564,8 +565,8 @@ struct server::internal {
G_DBUS_ERROR_FAILED,
"Internal error");
assert(!"method call on non-existent server");
return false;
}

}

static void name_acquired_handler(
Expand Down

0 comments on commit 3b19a11

Please sign in to comment.