~aleteoryx/muditaos

2b1ae19d626a5a788a354e054dcc1161c9b93455 — Adam Dobrowolski 3 years ago dc9ad45
[MOS-512] Fix build with gcc12

As in topic
M module-cellular/at/UrcFactory.hpp => module-cellular/at/UrcFactory.hpp +2 -1
@@ 1,8 1,9 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once

#include <memory>
#include "Urc.hpp"
#include <memory>


M module-db/Database/DatabaseInitializer.cpp => module-db/Database/DatabaseInitializer.cpp +1 -0
@@ 6,6 6,7 @@
#include <algorithm>
#include <cstdio>
#include <memory>
#include <array>
#include <set>
#include <string>
#include <sstream>

M module-db/Tables/NotesTable.cpp => module-db/Tables/NotesTable.cpp +1 -1
@@ 124,7 124,7 @@ std::pair<std::vector<NotesTableRow>, int> NotesTable::getByText(const std::stri
                                                                 unsigned int limit)
{

    unsigned int count = 0;
    int count          = 0;
    auto queryRet      = db->query("SELECT COUNT(*), INSTR(snippet,'%q') pos FROM notes WHERE pos > 0;", text.c_str());
    if (queryRet && queryRet->getRowCount() != 0) {
        count = (*queryRet)[0].getUInt32();

M module-services/service-cellular/service-cellular/requests/CallRequest.hpp => module-services/service-cellular/service-cellular/requests/CallRequest.hpp +2 -1
@@ 1,8 1,9 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once

#include <memory>
#include <at/Result.hpp>
#include <memory>


M module-services/service-fileindexer/Common.hpp => module-services/service-fileindexer/Common.hpp +2 -1
@@ 1,8 1,9 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once

#include <array>
#include <algorithm>
#include <filesystem>
#include <array>

M module-utils/unicode/ucs2/ucs2/UCS2.cpp => module-utils/unicode/ucs2/ucs2/UCS2.cpp +2 -1
@@ 1,7 1,8 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "UCS2.hpp"
#include <array>
#include <cstring>
#include <cstdint>
#include <sstream>

M test/CMakeLists.txt => test/CMakeLists.txt +6 -10
@@ 18,6 18,8 @@ include(CMakeParseArguments)
include(DiskImage)
include(GoogleTest)

target_compile_options(gtest PRIVATE -Wno-error=maybe-uninitialized)

add_custom_target(unittests)

set(ROOT_TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE)


@@ 85,6 87,7 @@ function(add_gtest_executable)
        ${ARGN}
    )


    if(NOT _TEST_ARGS_NAME)
        message(FATAL_ERROR "You must provide a test name")
    endif(NOT _TEST_ARGS_NAME)


@@ 112,18 115,11 @@ function(add_gtest_executable)
        enable_test_filesystem()
    endif()

    target_link_libraries(${_TESTNAME} PRIVATE gtest_main gmock log-api)
    foreach(lib ${_TEST_ARGS_LIBS})
        target_link_libraries(${_TESTNAME} PRIVATE ${lib})
    endforeach(lib)

    foreach(include ${_TEST_ARGS_INCLUDE})
        target_include_directories(${_TESTNAME} PRIVATE ${include})
    endforeach(include)
    target_link_libraries(${_TESTNAME} PRIVATE gtest_main gmock log-api ${_TEST_ARGS_LIBS})

    foreach(def ${_TEST_ARGS_DEFS})
        target_compile_definitions(${_TESTNAME} PRIVATE ${def})
    endforeach(def)
    target_include_directories(${_TESTNAME} PRIVATE ${_TEST_ARGS_INCLUDE})
    target_compile_definitions(${_TESTNAME} PRIVATE  ${_TEST_ARGS_DEFS})

    foreach(dep ${_TEST_ARGS_DEPS})
        add_dependencies(${_TESTNAME}  ${dep})