Skip to content

Commit

Permalink
cleanup: Add more nonnull and nullable annotations.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Feb 9, 2022
1 parent 5a3a0b6 commit 10f86f6
Show file tree
Hide file tree
Showing 80 changed files with 1,471 additions and 614 deletions.
4 changes: 3 additions & 1 deletion auto_tests/messenger_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,9 @@ int main(void)
options.port_range[0] = 41234;
options.port_range[1] = 44234;
options.log_callback = (logger_cb *)print_debug_log;
m = new_messenger(mono_time, &options, nullptr);
unsigned int err;
m = new_messenger(mono_time, &options, &err);
ck_assert(err == MESSENGER_ERROR_NONE);

/* setup a default friend and friendnum */
if (m_addfriend_norequest(m, friend_id) < 0) {
Expand Down
1 change: 1 addition & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ command = """\
else \
git clone --depth=1 https://github.com/jothepro/doxygen-awesome-css;
fi && \
sed -i -e 's/^non_null([^)]*) *//;s/^nullable([^)]*) *//' $(find . -name "*.[ch]") && \
doxygen docs/Doxyfile \
"""
publish = "_docs/html"
4 changes: 2 additions & 2 deletions other/analysis/variants.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

run
run -DVANILLA_NACL -I/usr/include/sodium
run "$@"
run -DVANILLA_NACL -I/usr/include/sodium "$@"
2 changes: 1 addition & 1 deletion other/bootstrap_daemon/docker/tox-bootstrapd.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
30845d5b6a5a2606afccceff83c7f1089040a800eb138c9ad92932cea2447e30 /usr/local/bin/tox-bootstrapd
502cc22df74fa369b2c09d117176705a1e801726db6f8360c688aee90973fa22 /usr/local/bin/tox-bootstrapd
1 change: 1 addition & 0 deletions other/docker/doxygen/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ WORKDIR /work
COPY . /work/
RUN cat docs/Doxyfile > Doxyfile \
&& echo "WARN_AS_ERROR = YES" >> Doxyfile \
&& sed -i -e 's/^non_null([^)]*) *//;s/^nullable([^)]*) *//' $(find . -name "*.[ch]") \
&& doxygen Doxyfile

FROM nginx:alpine
Expand Down
5 changes: 3 additions & 2 deletions testing/Messenger_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,11 @@ int main(int argc, char *argv[])

Messenger_Options options = {0};
options.ipv6enabled = ipv6enabled;
m = new_messenger(mono_time, &options, nullptr);
unsigned int err;
m = new_messenger(mono_time, &options, &err);

if (!m) {
fputs("Failed to allocate messenger datastructure\n", stderr);
fprintf(stderr, "Failed to allocate messenger datastructure: %d\n", err);
exit(0);
}

Expand Down
7 changes: 7 additions & 0 deletions toxcore/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,18 @@ exports_files(
visibility = ["//c-toxcore:__pkg__"],
)

cc_library(
name = "attributes",
hdrs = ["attributes.h"],
visibility = ["//c-toxcore:__subpackages__"],
)

cc_library(
name = "ccompat",
srcs = ["ccompat.c"],
hdrs = ["ccompat.h"],
visibility = ["//c-toxcore:__subpackages__"],
deps = [":attributes"],
)

cc_library(
Expand Down
Loading

0 comments on commit 10f86f6

Please sign in to comment.