mirror of
https://github.com/Atmosphere-NX/Atmosphere-libs.git
synced 2025-07-05 17:12:14 +02:00
Silence warning via compiler directive
This commit is contained in:
parent
e7e7f8c2ed
commit
e5e534d236
@ -36,13 +36,16 @@ class MitmServer : public IWaitable {
|
|||||||
MitmServer(const char *service_name, unsigned int max_s) : port_handle(0), max_sessions(max_s) {
|
MitmServer(const char *service_name, unsigned int max_s) : port_handle(0), max_sessions(max_s) {
|
||||||
Handle query_h = 0;
|
Handle query_h = 0;
|
||||||
|
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wstringop-truncation"
|
||||||
DoWithSmMitmSession([&]() {
|
DoWithSmMitmSession([&]() {
|
||||||
strncpy(mitm_name, service_name, sizeof(mitm_name));
|
strncpy(mitm_name, service_name, 8);
|
||||||
mitm_name[sizeof(mitm_name)-1] = '\x00';
|
mitm_name[8] = '\x00';
|
||||||
if (R_FAILED(smMitMInstall(&this->port_handle, &query_h, mitm_name))) {
|
if (R_FAILED(smMitMInstall(&this->port_handle, &query_h, mitm_name))) {
|
||||||
std::abort();
|
std::abort();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
RegisterMitmServerQueryHandle(query_h, std::move(ServiceObjectHolder(std::move(std::make_shared<MitmQueryService<T>>()))));
|
RegisterMitmServerQueryHandle(query_h, std::move(ServiceObjectHolder(std::move(std::make_shared<MitmQueryService<T>>()))));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user