cups-bjnp: fix build on base-gcc architectures

The build with -Werror fails due to a check whether an unsigned
integer is < 0.

"Sure" ajacoutot
This commit is contained in:
tb 2021-06-15 19:48:44 +00:00
parent be2575b92e
commit c4eb0c5e93
2 changed files with 19 additions and 1 deletions

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.5 2021/02/07 19:27:18 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.6 2021/06/15 19:48:44 tb Exp $
COMMENT= BJNP protocol backend for CUPS
DISTNAME= cups-bjnp-2.0.3
REVISION= 0
CATEGORIES= print

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-bjnp-io_c,v 1.3 2021/06/15 19:48:44 tb Exp $
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];