Skip to content

Commit

Permalink
Fix sonarcloud warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
thevindu-w committed Jan 13, 2025
1 parent 273e5ff commit 86749e3
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 20 deletions.
11 changes: 4 additions & 7 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
ARG DISTRO

FROM ubuntu:noble as ubuntu_builder

RUN apt-get update && \
apt-get install --no-install-recommends -y apt-transport-https
FROM ubuntu:noble AS ubuntu_builder

# Install build dependencies
RUN apt-get install --no-install-recommends -y gcc make libc6-dev libx11-dev libxmu-dev libxcb-randr0-dev libpng-dev libssl-dev libunistring-dev
RUN apt-get update && apt-get install --no-install-recommends -y gcc make libc6-dev libx11-dev libxmu-dev libxcb-randr0-dev libpng-dev libssl-dev libunistring-dev

# Install test dependencies
RUN apt-get install --no-install-recommends -y openssl xclip python3-minimal diffutils findutils coreutils netcat-openbsd sed
Expand All @@ -16,15 +13,15 @@ WORKDIR /debs
RUN apt-get download xvfb libunwind8 libgl1 libpixman-1-0 libxfont2 libglvnd0 libglx0 libfontenc1 libfreetype6 libbrotli1 xkb-data libxkbfile1 x11-xkb-utils
RUN dpkg --force-depends -i ./*.deb 2>/dev/null && apt-get clean -y

FROM fedora:41 as fedora_builder
FROM fedora:41 AS fedora_builder

# Install build dependencies
RUN dnf install --setopt=install_weak_deps=False -y gcc make glibc-devel libX11-devel libXmu-devel libpng-devel openssl-devel libunistring-devel

# Install test dependencies
RUN dnf install --setopt=install_weak_deps=False -y xorg-x11-server-Xvfb openssl xclip python3 findutils diffutils coreutils netcat sed && dnf clean all

FROM archlinux:base as arch_builder
FROM archlinux:base AS arch_builder

# Install build dependencies
RUN pacman -Sy && \
Expand Down
11 changes: 4 additions & 7 deletions docker/release/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
ARG DISTRO
ARG VERSION="latest"

FROM ubuntu:${VERSION} as ubuntu_builder

RUN apt-get update && \
apt-get install --no-install-recommends -y apt-transport-https
FROM ubuntu:${VERSION} AS ubuntu_builder

# Install dependencies
RUN apt-get install --no-install-recommends -y coreutils gcc make libc6-dev libx11-dev libxmu-dev libxcb-randr0-dev libpng-dev libssl-dev libunistring-dev && apt-get clean -y
RUN apt-get update && apt-get install --no-install-recommends -y coreutils gcc make libc6-dev libx11-dev libxmu-dev libxcb-randr0-dev libpng-dev libssl-dev libunistring-dev && apt-get clean -y

FROM fedora:41 as fedora_builder
FROM fedora:41 AS fedora_builder

# Install dependencies
RUN dnf install --setopt=install_weak_deps=False -y coreutils gcc make glibc-devel libX11-devel libXmu-devel libpng-devel openssl-devel libunistring-devel

FROM archlinux:base as arch_builder
FROM archlinux:base AS arch_builder

# Install dependencies
RUN pacman -Sy && \
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/v1.html
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ <h2 id="get_image">Get Image</h2>
1B B0 42 B9 95 01 F5 AC 8B BF 9A D6 CD FC 0F 82 8C 0E 05 22 B1 80 9C 00 00 00 00 49 45 4E 44 AE
42 60 82</td>
<td>Server sends the image copied to the clipboard (or a screenshot), which is 95 bytes long.<br>
<div class="image"><span>The image is: </span><img alt="shared image"
<div class="image"><span>The image is: </span><img alt="shared item"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAAJklEQVQI11XLIRIAIBCAQHD8/5cxaPBoG7BCuZUB9ayLv5rWzfwPgowOBSKxgJwAAAAASUVORK5CYII=">
</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/v2.html
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ <h2 id="get_image">Get Image</h2>
1B B0 42 B9 95 01 F5 AC 8B BF 9A D6 CD FC 0F 82 8C 0E 05 22 B1 80 9C 00 00 00 00 49 45 4E 44 AE
42 60 82</td>
<td>Server sends the image copied to the clipboard (or a screenshot), which is 95 bytes long.<br>
<div class="image"><span>The image is: </span><img alt="shared image"
<div class="image"><span>The image is: </span><img alt="shared item"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAAJklEQVQI11XLIRIAIBCAQHD8/5cxaPBoG7BCuZUB9ayLv5rWzfwPgowOBSKxgJwAAAAASUVORK5CYII=">
</div>
</td>
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/v3.html
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ <h2 id="get_image">Get Image/Screenshot</h2>
1B B0 42 B9 95 01 F5 AC 8B BF 9A D6 CD FC 0F 82 8C 0E 05 22 B1 80 9C 00 00 00 00 49 45 4E 44 AE
42 60 82</td>
<td>Server sends the image copied to the clipboard (or a screenshot), which is 95 bytes long.<br>
<div class="image"><span>The image is: </span><img alt="shared image"
<div class="image"><span>The image is: </span><img alt="shared item"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAAJklEQVQI11XLIRIAIBCAQHD8/5cxaPBoG7BCuZUB9ayLv5rWzfwPgowOBSKxgJwAAAAASUVORK5CYII=">
</div>
</td>
Expand Down Expand Up @@ -829,7 +829,7 @@ <h2 id="get_copied_image_only">Get Copied Image Only</h2>
1B B0 42 B9 95 01 F5 AC 8B BF 9A D6 CD FC 0F 82 8C 0E 05 22 B1 80 9C 00 00 00 00 49 45 4E 44 AE
42 60 82</td>
<td>Server sends the image copied to the clipboard, which is 95 bytes long.<br>
<div class="image"><span>The image is: </span><img alt="shared image"
<div class="image"><span>The image is: </span><img alt="shared item"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAAJklEQVQI11XLIRIAIBCAQHD8/5cxaPBoG7BCuZUB9ayLv5rWzfwPgowOBSKxgJwAAAAASUVORK5CYII=">
</div>
</td>
Expand Down
4 changes: 2 additions & 2 deletions src/xclip/xclib.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
extern int xcout(Display *, Window, XEvent, Atom, Atom, Atom *, unsigned char **, unsigned long *, unsigned int *);
extern int xcin(Display *, Window *, XEvent, Atom *, Atom, const unsigned char *, unsigned long, unsigned long *,
unsigned int *);
extern void *xcmalloc(size_t);
extern void *xcrealloc(void *, size_t);
extern void *xcmalloc(size_t) __attribute__((__malloc__));
extern void *xcrealloc(void *, size_t) __attribute__((__malloc__));

#endif // XCLIP_XCLIB_H_

0 comments on commit 86749e3

Please sign in to comment.