From patchwork Tue Oct 19 11:25:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Hilliard X-Patchwork-Id: 1543231 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=srSVUQ86; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=RggfyRK4; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::103b; helo=mail-pj1-x103b.google.com; envelope-from=swupdate+bncbcl4hcw73qcbbm6wxkfqmgqemjzuvoi@googlegroups.com; receiver=) Received: from mail-pj1-x103b.google.com (mail-pj1-x103b.google.com [IPv6:2607:f8b0:4864:20::103b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HYWdP54Wpz9sP7 for ; Tue, 19 Oct 2021 22:25:44 +1100 (AEDT) Received: by mail-pj1-x103b.google.com with SMTP id nv10-20020a17090b1b4a00b001a150b49105sf1403825pjb.3 for ; Tue, 19 Oct 2021 04:25:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1634642739; cv=pass; d=google.com; s=arc-20160816; b=f+HfcicPH4QdYLSiDWR8/p2DP1OS0A15xoVexb1hX2UfbFkoC+vJaYJJf+qPacuNl9 v7ZAe1X2DH8HvbTuo3y1uyvBdgStPmEUjJJripoSyjlOHRzKu0XuQ5ZJ2vUKMGQMYg2n DpVO8UZKRWN4kTQkRv3HdPtF/4Vi/kRB/q7Xt+zFFix1easf1BN9EmxeUH4SYIQ4+IdL GMevdKv6TG2OPWIGxIQqxAPW3gAIenoyySmma4V8V+iVmVxTAZnBzdC2DYpSElKGXi/X 0B5rzTMyzHV2dTMvd2mJfebya1IMdxb5UJytV6CjRbnZMz7zLHPqscuJFHG23j4+EsOD 55uw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature :dkim-signature; bh=szosUAcxobL+/cohB3LSgEp1EOWfZgZxV7xhYcCvGwI=; b=THS1boD+51llmEJbssEF9Jg6JcvKeVbAUxUsDjRpb3p3U6n4CrmStEwp/OVF3GfIJW RptVWNhQEu6VNKRhyZbBbmOPQH3DQq5y5sXL9JePdzBXXjhQwq8K/Ti4E6iJ1koaHknt 6GbGlw6aRsFTd89voON1tRuhg9sb0/Q3j8wrHNrRcWA5m40wq/aNDErfv9m6Xk6Ae3Iv xdA5fSf4l3Sf6zgvA9hbeOwjMDW8niI4Hx933w/aqn+dyT2HdkAk+Z/sfXvlvnTo5hBP Y1vFNq1n7a9Rcdgecup21jSAK6+CTlEsHNVNARid6/7ga0AA9yILI/FIB6V8XO7hh71V 1OdA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cOiFJesL; spf=pass (google.com: domain of james.hilliard1@gmail.com designates 2607:f8b0:4864:20::d31 as permitted sender) smtp.mailfrom=james.hilliard1@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=szosUAcxobL+/cohB3LSgEp1EOWfZgZxV7xhYcCvGwI=; b=srSVUQ86CUKNU3yFwHnpJc4x8TUY70sm4hAWZa+S+zbFKCeoVM8ZhQX9nEEfrgRkLN wix3hgOAumhnlgfkShRD3jN5ooU0lyVSgPe8NV+O22I8nyE6crKeD+ZHZ3jDi2LKIyfE VGLa6k4huUTXUXrncplBSUalnMA7lWi04Qiys/xZ5vQcRAWPuMmIM8fN9esNy6l2TgPb OQjZuY7bAU1l0TH/6qw3ZARJN8usTgG3HPSdD/8x48WmGwCj0iyJpKP7zWOXJ6DeQXu4 jXUxfFmB2ZM1lxcb8SUjniCxnfdh/DMPL1DQFH5LBt3pudDElp0OSLmUR+/VuGerdIvZ teuw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=szosUAcxobL+/cohB3LSgEp1EOWfZgZxV7xhYcCvGwI=; b=RggfyRK4CO/WkKZ22SAhDfo5kCvjyC20rBnSwhOP+gAdTeWvAC3fJbrXN8uDWgY5V5 lpTaHvJCJy1KPnO7D0zmvS3w93f4+hbCHn+MZlskOWycOpSiNUDkCPv8WWryn18tX+J3 /tieE7mJ0ieHcVAg+TDBEYLKxd2Z3TWGwZYOKnquqT2IRrrfwGrymv8MlXz1yqmmacfB c8P2YqD7zCCEvKS6QXqzwVN7ukUxpNzrgWsjH/nYuPp4nNAIp7d8ej3dua0VYqVep4hH yvUY8GvHLLYmNNf5X/PTBwEbkw0zSu15tEDS207j7PtuqM61KV0/l4BXGZwAEn61EGwj 9oMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=szosUAcxobL+/cohB3LSgEp1EOWfZgZxV7xhYcCvGwI=; b=3AL+CgGElDVgnhTG6sMyoM30aYXZBgg9plqmgGr7paVsz0PvRCtoPL9hHOslFHtBwH X/Jskps7Gp6+2DtwooSrCKydKUJqi8kX39cGOpA+4f86J0lKi5PyuJOZLyym5XEDwMcO G4Z6cYtqGmEE8P76aMkIKY2PRYXiddgIHgPRYihF7sfznlCmZ2aQG6WDfgDVhYDipGii LDVhZy3QHiv7P6fm5Z4upq6YXm6sIYGwaAimaOFQXQwLSB4GeJIz8ieTChiIjNDpUPGH 3CBD5Q4NDhtgDx9tf9X6PdlLS4mAqUFwWBIA+QEQuQSpBEtgmfTey5qhD2YOqVfvHnMV f66Q== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM531itPJHT4BY/XeZPHBBki0QmhuiEK0CSDKpYEKuiGLGhpbKbrmZ VjHFFfojnFV2F1vSH+2nLRk= X-Google-Smtp-Source: ABdhPJxS9Xi9gpI7noJ7LyKStL7RB9NTmYe7fReItfb0pkxP/JVoSmWu7O2OhXm8BDeII0NA5CZIQw== X-Received: by 2002:a65:5382:: with SMTP id x2mr28167150pgq.176.1634642739709; Tue, 19 Oct 2021 04:25:39 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a17:90b:390b:: with SMTP id ob11ls1398958pjb.2.canary-gmail; Tue, 19 Oct 2021 04:25:39 -0700 (PDT) X-Received: by 2002:a17:90a:de84:: with SMTP id n4mr5880248pjv.226.1634642739018; Tue, 19 Oct 2021 04:25:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634642739; cv=none; d=google.com; s=arc-20160816; b=oMuSitM0VcMkvz6nMaEh57ln/nZZw85JowC5epUG5sgaX66r7vLEBsBzajXRO+uMYR RuCdzMEC2y2kCr5CWY65JdZ1oBhWdFc0itbctJ/VcoiQ3IVgiY9ybCrzt4lpuW4l5pKp 1ld8ZSxmhBMMD/iw5DdgT+TSAhQJtGVo80oKoIXT7nhrte9GYGrOYqCm15GZO7p4BfIl 18cXTT/1NXedr97jeLzP55vumjMfiyjL2S250DZQyY6eKO+0S/8kJ3ciy54vKFYuDRyZ q9cYXnrxc7mqa3cxHGzQzbncElUNVVHb7CeMucLbJ53+zjvKC4zBSsn6HyWIM3yhxkZu rIQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=wVvlxxZRHI3L8wLgCRYco7kRkOBTjUh1iQgi68XEK0U=; b=dGSU4G+tAEtAgxH+aVG4ZI2U55SgI3M5ZRhZ54zc6teZb65quQ6WlaNvLhvSSz/hUf RsVYCB4wmGjN22t3L4KPlLM7asHD7LfYS+iZ/GP1dDC8sunbGVyQ0DufsHQRf1crU8tj zinNAkcqkX+whz/RrCS14dU0GgLhj8W6V7MqPjYdBMjEzi+NlojML8GhT3Xr0ARfKsJF BrC8GbvcGUchgcrk3lHB4BjbARDSfpRgbjkeHmW0R1l2iE4HQLJ1wkBX9DAjGcfv4dsb mVMm1VxC6Nvt8sSi92Q3ugl2SayOqlA2wnb5RkcvFQ9Q+ntkIKuk8xliRbIJqlMFsqMV xl/A== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cOiFJesL; spf=pass (google.com: domain of james.hilliard1@gmail.com designates 2607:f8b0:4864:20::d31 as permitted sender) smtp.mailfrom=james.hilliard1@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com. [2607:f8b0:4864:20::d31]) by gmr-mx.google.com with ESMTPS id p18si1252515plr.1.2021.10.19.04.25.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Oct 2021 04:25:39 -0700 (PDT) Received-SPF: pass (google.com: domain of james.hilliard1@gmail.com designates 2607:f8b0:4864:20::d31 as permitted sender) client-ip=2607:f8b0:4864:20::d31; Received: by mail-io1-xd31.google.com with SMTP id e144so19893813iof.3 for ; Tue, 19 Oct 2021 04:25:38 -0700 (PDT) X-Received: by 2002:a05:6602:1227:: with SMTP id z7mr18546513iot.150.1634642738567; Tue, 19 Oct 2021 04:25:38 -0700 (PDT) Received: from MacBook-Pro-2.localdomain (97-118-169-148.hlrn.qwest.net. [97.118.169.148]) by smtp.gmail.com with ESMTPSA id 2sm7937667iob.13.2021.10.19.04.25.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Oct 2021 04:25:38 -0700 (PDT) From: James Hilliard To: swupdate@googlegroups.com Cc: James Hilliard Subject: [swupdate] [PATCH v4 3/3] mongoose: Fix compile warnings and add SPDX Date: Tue, 19 Oct 2021 05:25:31 -0600 Message-Id: <20211019112531.94233-3-james.hilliard1@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211019112531.94233-1-james.hilliard1@gmail.com> References: <20211019112531.94233-1-james.hilliard1@gmail.com> MIME-Version: 1.0 X-Original-Sender: james.hilliard1@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cOiFJesL; spf=pass (google.com: domain of james.hilliard1@gmail.com designates 2607:f8b0:4864:20::d31 as permitted sender) smtp.mailfrom=james.hilliard1@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Signed-off-by: James Hilliard --- mongoose/mongoose.c | 14 ++++++++------ mongoose/mongoose.h | 2 ++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/mongoose/mongoose.c b/mongoose/mongoose.c index 84978f6..403b471 100644 --- a/mongoose/mongoose.c +++ b/mongoose/mongoose.c @@ -2,6 +2,8 @@ // Copyright (c) 2013-2021 Cesanta Software Limited // All rights reserved // +// SPDX-License-Identifier: GPL-2.0-only +// // This software is dual-licensed: you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as // published by the Free Software Foundation. For the terms of this @@ -177,7 +179,7 @@ static size_t mg_dns_parse_name_depth(const uint8_t *s, size_t len, size_t ofs, return i; } -size_t mg_dns_parse_name(const uint8_t *s, size_t n, size_t ofs, char *dst, +static size_t mg_dns_parse_name(const uint8_t *s, size_t n, size_t ofs, char *dst, size_t dstlen) { return mg_dns_parse_name_depth(s, n, ofs, dst, dstlen, 0); } @@ -303,7 +305,7 @@ static void dns_cb(struct mg_connection *c, int ev, void *ev_data, (void) fn_data; } -void mg_dns_send(struct mg_connection *c, const struct mg_str *name, +static void mg_dns_send(struct mg_connection *c, const struct mg_str *name, uint16_t txnid, bool ipv6) { struct { struct mg_dns_header header; @@ -922,7 +924,7 @@ struct mg_str *mg_http_get_header(struct mg_http_message *h, const char *name) { return NULL; } -void mg_http_parse_headers(const char *s, const char *end, +static void mg_http_parse_headers(const char *s, const char *end, struct mg_http_header *h, int max_headers) { int i; for (i = 0; i < max_headers; i++) { @@ -1122,7 +1124,7 @@ static void restore_http_cb(struct mg_connection *c) { c->pfn = http_cb; } -char *mg_http_etag(char *buf, size_t len, size_t size, time_t mtime) { +static char *mg_http_etag(char *buf, size_t len, size_t size, time_t mtime) { snprintf(buf, len, "\"%lx." MG_INT64_FMT "\"", (unsigned long) mtime, (int64_t) size); return buf; @@ -2575,7 +2577,7 @@ static uint32_t blk0(union char64long16 *block, int i) { z += (w ^ x ^ y) + blk(i) + 0xCA62C1D6 + rol(v, 5); \ w = rol(w, 30); -void mg_sha1_transform(uint32_t state[5], const unsigned char buffer[64]) { +static void mg_sha1_transform(uint32_t state[5], const unsigned char buffer[64]) { uint32_t a, b, c, d, e; union char64long16 block[1]; @@ -2973,7 +2975,7 @@ static void mg_set_non_blocking_mode(SOCKET fd) { #endif } -SOCKET mg_open_listener(const char *url, struct mg_addr *addr) { +static SOCKET mg_open_listener(const char *url, struct mg_addr *addr) { SOCKET fd = INVALID_SOCKET; int s_err = 0; // Memoized socket error, in case closesocket() overrides it memset(addr, 0, sizeof(*addr)); diff --git a/mongoose/mongoose.h b/mongoose/mongoose.h index 55a828c..16e6a67 100644 --- a/mongoose/mongoose.h +++ b/mongoose/mongoose.h @@ -2,6 +2,8 @@ // Copyright (c) 2013-2021 Cesanta Software Limited // All rights reserved // +// SPDX-License-Identifier: GPL-2.0-only +// // This software is dual-licensed: you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as // published by the Free Software Foundation. For the terms of this