Needed to disable -Wcast-function-type for service-thread.h file only.
service-thread.h will require some fundamental rework later.
Change-Id: If9d13dfe8e3ae78ac658a140e9582130e98e2b6a
/*
- * Copyright (c) 2014-2016 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2014-2020 Samsung Electronics Co., Ltd All Rights Reserved
*
* Contact: Rafal Krypa <r.krypa@samsung.com>
*
{
try {
addFromTemplate(ConfigFile(templatePath).read(), appProcessLabel, pkgName, authorId);
- } catch (FS::Exception::Base) {
+ } catch (FS::Exception::Base &) {
LogError("Error reading template file: " << templatePath);
ThrowMsg(SmackException::FileError, "Error reading template file: " << templatePath);
}
/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2011 - 2020 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
INTERNAL_LOG("### Function: " << function);
INTERNAL_LOG(
"################################################################################");
- } catch (Exception) {
+ } catch (Exception &) {
// Just ignore possible double errors
}
/*
- * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2000 - 2020 Samsung Electronics Co., Ltd All Rights Reserved
*
* Contact: Rafal Krypa <r.krypa@samsung.com>
*
namespace SecurityManager {
+// TODO rewrite the EventDescription structure and its members handling.
+// service-thread.h event handling needs re-work for gcc 8+, now keeping it as-is.
+// Especially the ugly function typecast in line 143...
+#if __GNUC__ >= 8
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wcast-function-type"
+#endif
+
template <class Service>
class ServiceThread {
public:
bool m_quit;
};
+#if __GNUC__ >= 8
+#pragma GCC diagnostic pop
+#endif
+
} // namespace SecurityManager
/*
- * Copyright (c) 2000-2019 Samsung Electronics Co., Ltd. All rights reserved
+ * Copyright (c) 2000-2020 Samsung Electronics Co., Ltd. All rights reserved
*
* Contact: Rafal Krypa <r.krypa@samsung.com>
*
sockaddr_un serverAddress;
memset(&serverAddress, 0, sizeof(serverAddress));
serverAddress.sun_family = AF_UNIX;
- strncpy(serverAddress.sun_path, desc.serviceHandlerPath.c_str(), sizeof(serverAddress.sun_path));
+ memcpy(serverAddress.sun_path, desc.serviceHandlerPath.c_str(), desc.serviceHandlerPath.length() + 1);
unlink(serverAddress.sun_path);
mode_t originalUmask;