Sure.
—
Antoine
> On 15 Jun 2021, at 16:27, Theo Buehler <tb@theobuehler.org> wrote:
>
> This is built with -Werror and fails because of checking an unsigned
> value for negativity on base-gcc architectures:
>
> if ((session_id = bjnp_send_job_details(addr, user, title)) < 0) {
>
> bjnp-io.c:174: warning: comparison is always false due to limited range of data type
>
> session_id is later assigned to an uint16_t, so no change in behavior.
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/print/cups-bjnp/Makefile,v
> retrieving revision 1.5
> diff -u -p -r1.5 Makefile
> --- Makefile 7 Feb 2021 19:27:18 -0000 1.5
> +++ Makefile 15 Jun 2021 07:46:44 -0000
> @@ -3,6 +3,7 @@
> COMMENT= BJNP protocol backend for CUPS
>
> DISTNAME= cups-bjnp-2.0.3
> +REVISION= 0
>
> CATEGORIES= print
>
> Index: patches/patch-bjnp-io_c
> ===================================================================
> RCS file: patches/patch-bjnp-io_c
> diff -N patches/patch-bjnp-io_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-bjnp-io_c 15 Jun 2021 07:52:36 -0000
> @@ -0,0 +1,17 @@
> +$OpenBSD$
> +
> +Fix build with base-gcc:
> +bjnp-io.c:174: warning: comparison is always false due to limited range of data type
> +
> +Index: bjnp-io.c
> +--- bjnp-io.c.orig
> ++++ bjnp-io.c
> +@@ -161,7 +161,7 @@ bjnp_tcp_connect(printer_t *printer)
> + static printer_t *
> + bjnp_init_printer(printer_t *printer, http_addr_t *addr, const char *user, const char *title)
> + {
> +- uint16_t session_id;
> ++ int session_id;
> + char host[BJNP_HOST_MAX];
> + int port;
> + char family[BJNP_FAMILY_MAX];
>
No comments:
Post a Comment