Skip to content

Commit bf0bab0

Browse files
Merge branch 'drogonframework:master' into master
2 parents 4b0e4c2 + 8636b10 commit bf0bab0

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

.github/workflows/cmake.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
strategy:
7171
fail-fast: false
7272
matrix:
73-
osver: [13, 14, 15]
73+
osver: [14, 15]
7474
steps:
7575
- name: Checkout Drogon source code
7676
uses: actions/checkout@v4
@@ -175,12 +175,12 @@ jobs:
175175
sudo apt-get --purge remove postgresql postgresql-doc postgresql-common postgresql-client-common
176176
sudo apt-get -y install postgresql-all
177177
178-
- name: Install g++-13
179-
if: startsWith(matrix.compiler.cxx, 'g++') && matrix.compiler.ver == 13
178+
- name: Install g++
179+
if: startsWith(matrix.compiler.cxx, 'g++') && (matrix.compiler.ver == 13 || matrix.compiler.ver == 9)
180180
run: |
181181
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
182182
sudo apt-get install g++-${{ matrix.compiler.ver }}
183-
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 13
183+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.compiler.ver }} ${{ matrix.compiler.ver }}
184184
185185
- name: Install Clang
186186
if: startsWith(matrix.compiler.cxx, 'clang') && matrix.compiler.ver < 13

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
6161
# Initializes the CodeQL tools for scanning.
6262
- name: Initialize CodeQL
63-
uses: github/codeql-action/init@v3
63+
uses: github/codeql-action/init@v4
6464
with:
6565
languages: ${{ matrix.language }}
6666
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -75,6 +75,6 @@ jobs:
7575
run: ninja && sudo ninja install
7676

7777
- name: Perform CodeQL Analysis
78-
uses: github/codeql-action/analyze@v3
78+
uses: github/codeql-action/analyze@v4
7979
with:
8080
category: "/language:${{matrix.language}}"

cmake_modules/FindHiredis.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,8 @@ if(Hiredis_FOUND)
3838
"${HIREDIS_INCLUDE_DIRS}"
3939
INTERFACE_LINK_LIBRARIES
4040
"${HIREDIS_LIBRARIES}")
41-
endif(Hiredis_FOUND)
41+
endif(Hiredis_FOUND)
42+
43+
if(WIN32 AND MINGW)
44+
target_link_libraries(Hiredis_lib INTERFACE ws2_32 secur32 crypt32 bcrypt zstd curl shlwapi)
45+
endif()

lib/src/CacheFile.cc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ CacheFile::CacheFile(const std::string &path, bool autoDelete)
3636
file_ = nullptr;
3737
}
3838
#endif
39+
if (!file_)
40+
LOG_SYSERR << "CacheFile fopen:";
3941
}
4042

4143
CacheFile::~CacheFile()
@@ -63,7 +65,10 @@ CacheFile::~CacheFile()
6365
void CacheFile::append(const char *data, size_t length)
6466
{
6567
if (file_)
66-
fwrite(data, length, 1, file_);
68+
{
69+
if (!fwrite(data, length, 1, file_))
70+
LOG_SYSERR << "CacheFile append:";
71+
}
6772
}
6873

6974
size_t CacheFile::length()
@@ -95,7 +100,7 @@ char *CacheFile::data()
95100
if (data_ == MAP_FAILED)
96101
{
97102
data_ = nullptr;
98-
LOG_SYSERR << "mmap:";
103+
LOG_SYSERR << "CacheFile mmap:";
99104
}
100105
}
101106
return data_;

0 commit comments

Comments
 (0)