Skip to content

Commit d1adc7f

Browse files
committed
Merge branch 'develop' of github.com:geekprojects/libgeek into develop
2 parents 50944af + 9abc8c4 commit d1adc7f

File tree

6 files changed

+93
-138
lines changed

6 files changed

+93
-138
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [develop]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [develop]
9+
schedule:
10+
- cron: '0 11 * * 3'
11+
12+
jobs:
13+
analyze:
14+
name: Analyze
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
# Override automatic language detection by changing the below list
21+
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
22+
language: ['cpp']
23+
# Learn more...
24+
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
25+
26+
steps:
27+
- name: Install dependencies
28+
run: >
29+
sudo apt-get update &&
30+
sudo apt-get install libxml2-dev libpng-dev libjpeg-dev libjpeg-turbo8 sqlite3 libsqlite-dev libsigc++-2.0-dev libfreetype6-dev
31+
32+
- name: Checkout repository
33+
uses: actions/checkout@v2
34+
with:
35+
# We must fetch at least the immediate parents so that if this is
36+
# a pull request then we can checkout the head.
37+
fetch-depth: 2
38+
39+
# If this run was triggered by a pull request event, then checkout
40+
# the head of the pull request instead of the merge commit.
41+
- run: git checkout HEAD^2
42+
if: ${{ github.event_name == 'pull_request' }}
43+
44+
# Initializes the CodeQL tools for scanning.
45+
- name: Initialize CodeQL
46+
uses: github/codeql-action/init@v1
47+
with:
48+
languages: ${{ matrix.language }}
49+
50+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
51+
# If this step fails, then you should remove it and run the build manually (see below)
52+
- name: Autobuild
53+
uses: github/codeql-action/autobuild@v1
54+
55+
# ℹ️ Command-line programs to run using the OS shell.
56+
# 📚 https://git.io/JvXDl
57+
58+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
59+
# and modify them (or add more) to build your code if your project
60+
# uses a compiled language
61+
62+
#- run: |
63+
# make bootstrap
64+
# make release
65+
66+
- name: Perform CodeQL Analysis
67+
uses: github/codeql-action/analyze@v1

CMakeLists.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,26 @@ string(REPLACE ";" " " PKGCONFIG_LDFLAGS "${PKGCONFIG_LDFLAGS_LIST}")
5050
configure_file(libgeek.pc.in libgeek.pc @ONLY)
5151
install(FILES ${CMAKE_BINARY_DIR}/libgeek.pc DESTINATION "lib${LIB_SUFFIX}/pkgconfig")
5252

53+
54+
#
55+
# Doxygen
56+
#
57+
find_package(Doxygen COMPONENTS dot)
58+
if (DOXYGEN_FOUND)
59+
set(DOXYGEN_GENERATE_HTML YES)
60+
set(DOXYGEN_GENERATE_MAN NO)
61+
set(DOXYGEN_EXTRACT_ALL YES)
62+
63+
doxygen_add_docs(
64+
doxygen
65+
${PROJECT_SOURCE_DIR}/include
66+
COMMENT "Generate man pages"
67+
)
68+
endif()
69+
70+
#
71+
# CPack
72+
#
5373
include(InstallRequiredSystemLibraries)
5474
set(CPACK_PACKAGE_CONTACT "Ian Parker <[email protected]>")
5575
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")

include/geek/gtk-chart.h

Lines changed: 0 additions & 75 deletions
This file was deleted.

include/geek/gtk-opengl.h

Lines changed: 0 additions & 59 deletions
This file was deleted.

src/core/logger.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,12 @@ void Logger::logv(LoggerLevel_t level, const char* msg, va_list va)
124124

125125
char timeStr[256];
126126
time_t t;
127-
struct tm *tm;
128127
t = time(NULL);
129-
tm = localtime(&t);
130-
strftime(timeStr, 256, "%Y/%m/%d %H:%M:%S", tm);
128+
129+
struct tm tm;
130+
localtime_r(&t, &tm);
131+
132+
strftime(timeStr, 256, "%Y/%m/%d %H:%M:%S", &tm);
131133

132134
printf("%s: %s: %s: %s%s\n", timeStr, levelStr.c_str(), m_name.c_str(), spaces.c_str(), buf);
133135
}

src/gfx/drawable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ bool Drawable::blit(
487487

488488
if (x == 0 && y == 0 && surface->getWidth() == getWidth() && surface->getHeight() == getHeight())
489489
{
490-
memcpy(getDrawingBuffer(), surface->getDrawingBuffer(), getWidth() * getHeight() * 4);
490+
memcpy(getDrawingBuffer(), surface->getDrawingBuffer(), (size_t)getWidth() * (size_t)getHeight() * 4l);
491491
return true;
492492
}
493493

0 commit comments

Comments
 (0)