Skip to content

Commit

Permalink
Fix: using %zu instead of %lu on size_t
Browse files Browse the repository at this point in the history
Some systems use a 64-bit size_t data type, even though unsigned long is only
 32 bits. It's best to use the specialized format specifier %zu instead of
 assuming that size_t is the same as unsigned long.
  • Loading branch information
nichtsfrei committed Apr 24, 2023
1 parent 5879a9d commit 009b689
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .docker/prod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ARG DEBIAN_FRONTEND=noninteractive
COPY . /source
RUN sh /source/.github/install-dependencies.sh
RUN cmake -DCMAKE_BUILD_TYPE=Release -B/build /source
RUN DESTDIR=/install cmake --build /build -- install
RUN DESTDIR=/install cmake --build /build -- install

FROM debian:stable-slim

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
# set this tag to latest and stable
echo "IS_LATEST_TAG=true" >> $GITHUB_ENV
fi
- name: Setup container meta information
- name: 'Setup meta information (IS_VERSION_TAG: ${{ env.IS_VERSION_TAG }}, IS_LATEST_TAG: ${{ env.IS_LATEST_TAG }} )'
id: meta
uses: docker/metadata-action@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion osp/osp.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ osp_connection_new (const char *host, int port, const char *cacert,

if (strlen (host) >= sizeof (addr.sun_path))
{
g_warning ("%s: given host / socket path too long (%lu > %lu bytes)",
g_warning ("%s: given host / socket path too long (%zu > %zu bytes)",
__func__, strlen (host), sizeof (addr.sun_path) - 1);
return NULL;
}
Expand Down

0 comments on commit 009b689

Please sign in to comment.