From patchwork Sat Aug 26 18:35:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 111053 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp2704468qge; Sat, 26 Aug 2017 11:35:36 -0700 (PDT) X-Received: by 10.99.183.13 with SMTP id t13mr2363015pgf.66.1503772536315; Sat, 26 Aug 2017 11:35:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503772536; cv=none; d=google.com; s=arc-20160816; b=H2twy9etxkxolK9MBGLRsvjwgFiMdYb5UEHuDJ+gaA1zR+tQ0s0Ns4KwoAxK8+kY8Q MSi3rGH7SAGtThc3cokdDbzZ0gAEq9swN4gPVwqJYAbPvxCTiCmzngxep4uJIsH4WEoO gI59K0gCEBl+ThbXwLOtLaX19k4Tx3ZmDdXOR4VtZ73QwIRjbLVmPPrJO/FbHvMuksE9 toIeyxiXLUR2rE38whjptVhKs53AN/8gZDAiE6j8dhtLpeYp4eUoVp2ZmePBE2bg0Zka bpIU3z0xeFdXs8qhHo4qSXXb4ddRCgJnM7ymijcPjPLLcqAlH3TKiY6oTlLqDO5ZYIiB 5Glg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=iHtpM/uLG97COI/QAwMpV8OZyjmsUANbQROjJ3TUt6U=; b=OY4umc2NhmbFhs0dELa3SNMrBnVE6ftRZFmZu29I4FQI9TE+CnhMqTdx2UxuYnHL/w fomAnhZiNZryD4heFqrZzDN5NjDgAeu0h9BR69MmovpV58elEZ0mMbrsM7muCVnYptSJ FMcCtOIbOdK2OnjiHBLHe5xYPPEIUX59oE31WiL8oKdkjyoFbNVOmLs72QdiRaLSpL41 F4XxEZVM323o2CkaI4WAFXVjH/PfIJKrPkaXjU7sDVZgg/y8b2lYY9gNHDmAiaAzV9DG za6zALhkw8JfH5zsSX+KlIgbhdH/UIa/SAVl3urgi4DXwxM15iwa4TyU4dqD0Af2P5tI Ku9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=cj8vrR06; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id v11si7136252plg.187.2017.08.26.11.35.35; Sat, 26 Aug 2017 11:35:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=cj8vrR06; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 12D6D77DCA; Sat, 26 Aug 2017 18:35:32 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pg0-f66.google.com (mail-pg0-f66.google.com [74.125.83.66]) by mail.openembedded.org (Postfix) with ESMTP id 2AFA778227 for ; Sat, 26 Aug 2017 18:35:27 +0000 (UTC) Received: by mail-pg0-f66.google.com with SMTP id 83so3179475pgb.3 for ; Sat, 26 Aug 2017 11:35:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=oEK1bOB21+ujAWlaP5um2bPinDGF/3UAb2b4WyxwPnc=; b=cj8vrR06Hu7Cne/hA/uNHELO6fa81MlbEzQfRqQqYIt9wKmyGKgFSNKtXLe69RUAKq iisTxf0WQeMFE6/O+J1U7DCKq456Ucf1zGT0L9MlwEeIaIHHxvD2sWMVjFL3Dz8rLvqi p4cARxxplMcUI84xunmJ1CYDE8PmyPo7Iskfo5pXlXlYO+kLW47XmqSHzeZbpu7RvMAl mJKsD+4KvtGyjIZ+sJEVuzNynd93C3huTtXMOOCx4oYuAA8FQG0CPEFEmwYPuHG741jI TwlXChSE/zKQ2z4OvzmNsL0IwSV3I/zrCINSSiHt+8Ieu7ZdlnFh8C92TUOkHTBkw6Og Sdrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=oEK1bOB21+ujAWlaP5um2bPinDGF/3UAb2b4WyxwPnc=; b=rDOJq/znU8Tm3ScDRCiZxte1F9huWdy6QW6UJThNTOQNcSFjeurEDzwTi9LbpWM8Lv hBtsGMYq+yRJBCyc6uuoiTlt9AxO/He83x+reFXAoA2m3F8qxwSD6ibMco96KlY6vScV YogH4c7R7T121Ruw0ukAKbefEJeJFpXMhV/HcnmL6EZsOtJkIBkFQhxj2PANmcp3hFxA TP0iepR3z1gsu/c0AjVanh0xQFsnA1ARIPG/ZAdCeoFON5JuP13XRrqc5wlWoRXl17fX jDOsYyEB2j1KNcO7sh/9w4tRfnT86EheebTEYXAQCECRoGb6Bdmj8LdZ4G0TQSmerw7B 7FWA== X-Gm-Message-State: AHYfb5j1uzImuRtQLeKRgKyReoQ2v1HSKNY+SnnF3jtnN2dQyfp6a5eF ZN8Ilop/D77LUcgY X-Received: by 10.98.79.136 with SMTP id f8mr2446049pfj.24.1503772528964; Sat, 26 Aug 2017 11:35:28 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::79ab]) by smtp.gmail.com with ESMTPSA id m2sm15240546pgs.72.2017.08.26.11.35.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 26 Aug 2017 11:35:28 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Sat, 26 Aug 2017 11:35:15 -0700 Message-Id: <20170826183521.34294-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.14.1 Subject: [oe] [meta-networking][PATCH 1/7] ippool: Fix build errors found by clang X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- .../ippool/ippool/0001-read-returns-ssize_t.patch | 31 ++++++++++++ ...02-Mark-first-element-of-a-string-as-null.patch | 31 ++++++++++++ ...003-cli-Mark-return-of-strtol-as-long-int.patch | 58 ++++++++++++++++++++++ .../recipes-daemons/ippool/ippool_1.3.bb | 5 +- 4 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 meta-networking/recipes-daemons/ippool/ippool/0001-read-returns-ssize_t.patch create mode 100644 meta-networking/recipes-daemons/ippool/ippool/0002-Mark-first-element-of-a-string-as-null.patch create mode 100644 meta-networking/recipes-daemons/ippool/ippool/0003-cli-Mark-return-of-strtol-as-long-int.patch -- 2.14.1 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-networking/recipes-daemons/ippool/ippool/0001-read-returns-ssize_t.patch b/meta-networking/recipes-daemons/ippool/ippool/0001-read-returns-ssize_t.patch new file mode 100644 index 000000000..7d3f9acb6 --- /dev/null +++ b/meta-networking/recipes-daemons/ippool/ippool/0001-read-returns-ssize_t.patch @@ -0,0 +1,31 @@ +From e4e0aae139b6489dc582fd14e54e562126482ce2 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 26 Aug 2017 07:23:53 -0700 +Subject: [PATCH 1/3] read() returns ssize_t + +Fixes +usl_fd.c:284:10: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare] + if (nb < 0) { + ~~ ^ ~ + +Signed-off-by: Khem Raj +--- + usl/usl_fd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/usl/usl_fd.c b/usl/usl_fd.c +index 3b7a813..04ba48c 100644 +--- a/usl/usl_fd.c ++++ b/usl/usl_fd.c +@@ -280,7 +280,7 @@ size_t usl_fd_read(int fd, void *buf, size_t count) + char *ptr = buf; + + for (chars_read = 0; chars_read < count; ) { +- size_t nb = read(fd, ptr, count - chars_read); ++ ssize_t nb = read(fd, ptr, count - chars_read); + if (nb < 0) { + if (errno == EINTR) + continue; +-- +2.14.1 + diff --git a/meta-networking/recipes-daemons/ippool/ippool/0002-Mark-first-element-of-a-string-as-null.patch b/meta-networking/recipes-daemons/ippool/ippool/0002-Mark-first-element-of-a-string-as-null.patch new file mode 100644 index 000000000..6e2bd523d --- /dev/null +++ b/meta-networking/recipes-daemons/ippool/ippool/0002-Mark-first-element-of-a-string-as-null.patch @@ -0,0 +1,31 @@ +From cf25576428903168cd41b183fb1ca9c2b7e2666e Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 26 Aug 2017 07:28:10 -0700 +Subject: [PATCH 2/3] Mark first element of a string as null + +Fixes +cli_lib.c:427:20: error: expression which evaluates to zero treated as a null pointer constant of type 'char *' [-Werror,-Wnon-literal-null-conversion] + values[arg] = '\0'; + ^~~~ + +Signed-off-by: Khem Raj +--- + cli/cli_lib.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cli/cli_lib.c b/cli/cli_lib.c +index 41a0b06..e4d2fd5 100644 +--- a/cli/cli_lib.c ++++ b/cli/cli_lib.c +@@ -424,7 +424,7 @@ int cli_find_args(int argc, char *argv[], struct cli_node *cmd, struct cli_node + if (arg_string[1] == '\0') { + /* no arg value - only allowed for string args */ + if (node->arg->parser == cli_arg_parse_string) { +- values[arg] = '\0'; ++ *values[arg] = '\0'; + } else { + result = -EINVAL; + break; +-- +2.14.1 + diff --git a/meta-networking/recipes-daemons/ippool/ippool/0003-cli-Mark-return-of-strtol-as-long-int.patch b/meta-networking/recipes-daemons/ippool/ippool/0003-cli-Mark-return-of-strtol-as-long-int.patch new file mode 100644 index 000000000..3854b1133 --- /dev/null +++ b/meta-networking/recipes-daemons/ippool/ippool/0003-cli-Mark-return-of-strtol-as-long-int.patch @@ -0,0 +1,58 @@ +From 994d9575374d3cdb34b1b0f70c3c53ae76fe578e Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 26 Aug 2017 07:41:05 -0700 +Subject: [PATCH 3/3] cli: Mark return of strtol as long int + +strtol does not return unsigned long + +error: taking the absolute value of unsigned type 'unsigned long' has no effect [-Werror,-Wabsolute-value] + if ((*endp == '\0') && (labs(tmp) < 32768)) { + +Signed-off-by: Khem Raj +--- + cli/cli_lib.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/cli/cli_lib.c b/cli/cli_lib.c +index e4d2fd5..5f487dc 100644 +--- a/cli/cli_lib.c ++++ b/cli/cli_lib.c +@@ -522,7 +522,7 @@ int cli_arg_parse_int32(struct cli_node *arg, const char *val, void *result) + int cli_arg_parse_int16(struct cli_node *arg, const char *val, void *result) + { + int16_t *intval = result; +- unsigned long tmp; ++ long tmp; + char *endp; + int ret = 0; + +@@ -539,7 +539,7 @@ int cli_arg_parse_int16(struct cli_node *arg, const char *val, void *result) + int cli_arg_parse_int8(struct cli_node *arg, const char *val, void *result) + { + int8_t *intval = result; +- unsigned long tmp; ++ long tmp; + char *endp; + int ret = 0; + +@@ -573,7 +573,7 @@ int cli_arg_parse_uint32(struct cli_node *arg, const char *val, void *result) + int cli_arg_parse_uint16(struct cli_node *arg, const char *val, void *result) + { + uint16_t *intval = result; +- unsigned long tmp; ++ long tmp; + char *endp; + int ret = 0; + +@@ -590,7 +590,7 @@ int cli_arg_parse_uint16(struct cli_node *arg, const char *val, void *result) + int cli_arg_parse_uint8(struct cli_node *arg, const char *val, void *result) + { + uint8_t *intval = result; +- unsigned long tmp; ++ long tmp; + char *endp; + int ret = 0; + +-- +2.14.1 + diff --git a/meta-networking/recipes-daemons/ippool/ippool_1.3.bb b/meta-networking/recipes-daemons/ippool/ippool_1.3.bb index 05921d536..6e4748357 100644 --- a/meta-networking/recipes-daemons/ippool/ippool_1.3.bb +++ b/meta-networking/recipes-daemons/ippool/ippool_1.3.bb @@ -21,7 +21,10 @@ SRC_URI = "https://sourceforge.net/projects/openl2tp/files/${BPN}/${PV}/${BPN}-$ file://makefile-add-ldflags.patch \ file://0001-usl_timer-Check-for-return-value-of-write-API.patch \ file://0001-Respect-flags-from-env.patch \ -" + file://0001-read-returns-ssize_t.patch \ + file://0002-Mark-first-element-of-a-string-as-null.patch \ + file://0003-cli-Mark-return-of-strtol-as-long-int.patch \ + " SRC_URI_append_libc-musl = "\ file://0002-link-with-libtirpc.patch \ file://0003-musl-fixes.patch \