Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
scan_build:
runs-on: ubuntu-latest
container:
image: debian:bullseye
image: debian:trixie
steps:
- name: install deps
run: |
apt-get update && apt-get install -yq build-essential autotools-dev lsb-release pkg-config automake autoconf libtool-bin clang-tools-11
apt-get update && apt-get install -yq build-essential autotools-dev lsb-release pkg-config automake autoconf libtool-bin clang-tools
apt-get install -yq cmake uuid-dev libssl-dev nlohmann-json3-dev git
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
run_tests:
runs-on: ubuntu-latest
container:
image: debian:bullseye
image: debian:trixie
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash
apt-get update && apt-get install -yq build-essential autotools-dev lsb-release pkg-config automake autoconf libtool-bin clang-tools-11
apt-get update && apt-get install -yq build-essential autotools-dev lsb-release pkg-config automake autoconf libtool-bin clang-tools
apt-get install -yq cmake uuid-dev libssl-dev colorized-logs git
./build_dependencies.sh
git config --global --add safe.directory `pwd`
sed -i '/cotire/d' ./CMakeLists.txt
mkdir -p scan-build
scan-build-11 -o ./scan-build/ cmake . -DWITH_JSON_VALIDATION=on -DWITH_PACKAGING=off
scan-build -o ./scan-build/ cmake . -DWITH_JSON_VALIDATION=on -DWITH_PACKAGING=off
mkdir -p tests/unit/logs
make -j`nproc --all` |& tee ./unit-tests-build-result.txt
exitstatus=${PIPESTATUS[0]}
Expand Down
4 changes: 2 additions & 2 deletions scan_build.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash
sed -i '/cotire/d' ./CMakeLists.txt
mkdir -p scan-build
scan-build-11 -o ./scan-build/ cmake . -DWITH_JSON_VALIDATION=on -DWITH_PACKAGING=off
scan-build-11 -o ./scan-build/ make -j`nproc --all` |& tee ./scan-build-result.txt
scan-build -o ./scan-build/ cmake . -DWITH_JSON_VALIDATION=on -DWITH_PACKAGING=off
scan-build -o ./scan-build/ make -j`nproc --all` |& tee ./scan-build-result.txt
exitstatus=${PIPESTATUS[0]}
echo "*** Exit status is $exitstatus";
export SubString="scan-build: No bugs found";
Expand Down
1 change: 1 addition & 0 deletions src/ks_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ static void default_logger(const char *file, const char *func, int line, int lev
if (len > 0) {
ks_mutex_lock(g_log_mutex);
ks_size_t total = len;
if (total > sizeof(buf)) total = sizeof(buf); /* len is capped in ks_log_format_output; prove it for the static analyzer */

//fprintf(stdout, "[%s] %s:%d %s() %s", LEVEL_NAMES[level], fp, line, func, data);
#if KS_PLAT_WIN
Expand Down
1 change: 0 additions & 1 deletion src/kws.c
Original file line number Diff line number Diff line change
Expand Up @@ -1713,7 +1713,6 @@ KS_DECLARE(ks_status_t) kws_connect_ex(kws_t **kwsP, ks_json_t *params, kws_flag
ks_sockaddr_t addr = { 0 };
ks_socket_t cl_sock = KS_SOCK_INVALID;
int family = AF_INET;
const char *ip = "127.0.0.1";
ks_port_t port = 443;
// char buf[50] = "";
const char *url = ks_json_get_object_string(params, "url", NULL);
Expand Down
2 changes: 1 addition & 1 deletion tests/testhttp.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ typedef struct ssl_profile_s {

static int init_ssl(ssl_profile_t *profile)
{
const char *err = "";
const char *err;

profile->ssl_ctx = SSL_CTX_new(profile->ssl_method); /* create context */
assert(profile->ssl_ctx);
Expand Down
2 changes: 1 addition & 1 deletion tests/testwebsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ typedef struct ssl_profile_s {

static int init_ssl(ssl_profile_t *profile)
{
const char *err = "";
const char *err;

profile->ssl_ctx = SSL_CTX_new(profile->ssl_method); /* create context */
assert(profile->ssl_ctx);
Expand Down
Loading