From patchwork Mon Oct 18 14:19:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Hilliard X-Patchwork-Id: 1542662 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=f0jbLRsE; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=YRLfb9+U; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::53f; helo=mail-pg1-x53f.google.com; envelope-from=swupdate+bncbcl4hcw73qcbbz4ew2fqmgqeytdsxjy@googlegroups.com; receiver=) Received: from mail-pg1-x53f.google.com (mail-pg1-x53f.google.com [IPv6:2607:f8b0:4864:20::53f]) (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 4HXzXB0b1Hz9sS8 for ; Tue, 19 Oct 2021 01:19:21 +1100 (AEDT) Received: by mail-pg1-x53f.google.com with SMTP id n9-20020a63f809000000b0026930ed1b24sf9931331pgh.23 for ; Mon, 18 Oct 2021 07:19:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1634566759; cv=pass; d=google.com; s=arc-20160816; b=eionWSWne6YLXgZDXqs6Ps97prUmZJWenTycIdl1HdNWzDBN3tvi8GSEBvTrYqJouq 2kk4aeO9GFMU9f+s/3lGMuKVQ4E9tPgkFikeTisic75gJ66n5Zkj/5RSn3PYewvK89bj hEZdzlihiTphqVR3tlZb723201unhlyOPd9JQUoFUkzZHeoumwhGKfG/FBQyHUjwmiFU zajag5GbQpmkryQAraN+OtKu5HJCOaA0ljltegX2zFn+uPcVJXQn/AdipKC5AhJF6thK Ht7cbFZURT6PEkwTPmykXvj5CX2LUNK65KLZS6hRxGByiP52nJFSREhuTYBueSK07rcN 8tIw== 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=TN2aXcGNo5D6RFaIHlbx78L/zpKKyI6YNpBEosTdCmc=; b=JZSmJU70NiAi8pb+EMvUXa+mWoR9/0/eUYIStQW5IbywuWYALnCDVeMEWm5zSVjB0+ yDk0AaZu5Eff17oeFIH4NSF2TT7qBwPO/i00hr3Kwutiae1u9j45iZODsyRBpEXQZqlb AktmlTHQhY0lY6tIv6CMOqmBiU2md+zIdYVIrQ0OvxNGsJ4qb6kagSLrIDq9pQGFgqRl kKL3lP3LvoS10FU/hhyY6BhrGGKpmB1bwTvVO1eBmrESvClAcPevK3/LKPC31rIdkcXi yb1xn4rF7wW/lX9fAAQa9cw879ppKxP0658kT48a0SoncG4stchkl0Lc4b8NbhTv+70I Ucyw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=oJrIKhh2; spf=pass (google.com: domain of james.hilliard1@gmail.com designates 2607:f8b0:4864:20::d2e 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=TN2aXcGNo5D6RFaIHlbx78L/zpKKyI6YNpBEosTdCmc=; b=f0jbLRsEIqHRSEWT5WWqUzAIG14JCguBk1G4GsvWGmcR/vxboGdtJcD1X703ocOa1r Njq1iaum546dZ9zVFJzGaxKUuyX5gjipd0OnerK1TQ6Dq5uICsZhAa/1pSKM1CmbTaR7 PBRu2SY8AJCtRfSA4IpENkBjxMkoeTcyPCknycGlHzQYCoieZKmJYmT7XrF+KyT2hu9F hw7iCJwh88yCNItnqu2wj3Hq6nWCUS9Ca8ApfqkLfybO8f7FAN2vDOIgr41Tto2tCd21 38Ji+DCGjGT4A9TVm3dMxr+uQ8u52oPbPw7zCs+HLlssPvkyFaOeGD/tnEQOLFne0Lgs v1+g== 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=TN2aXcGNo5D6RFaIHlbx78L/zpKKyI6YNpBEosTdCmc=; b=YRLfb9+UyfrbIJc9pcbbPj3o/mQUUytMZ6l1cgdv0k2NSNqJHVt6Dh0TkkEQ56fJcT mkc17UT5F5zCFooExFzErn3FzkVmZ2+gDPwZe+bKOk8DTyMjbUvvE3FnUM60exdLoSWV 5TamJoZrfvMpjC7gxe5NL3iLhtPhBZ3Uzq0sNjy/6Z5aYd8iLt4C8mlx7LfAfp0lCD7S //xSU084/ygnTw7SLB4yOM0cVwHILHQqbIXnbXERkHs9SdM2nfxa9LbR5FGv7AUEJBdM hf+cWJuY0khzJRHFw2OUcV9e9oB+7ahtK78fReInQn6xGinLKFOJqNozhBw88uXhDva/ W3+Q== 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=TN2aXcGNo5D6RFaIHlbx78L/zpKKyI6YNpBEosTdCmc=; b=5BqsnRwbKakwKuoS/fM2kY1K+t455TQPAPGXIEs3Xb/qV8AtVEK3Q05WIcwBkZ4Cda 5TVbJfnJDB+CoDwDIaSJdRfux+vdJtfqlDvjokzY5n2iwmUy9BzdcjeyUd2ndDrTr/KS BBVnLwx5Qqeq1PGVCbzlES+Ce83Kb7O/CdewTpsbYKdZ9AHb9FpHgrZ09Hk8IKEino/I J6zh9G7evCIq7QkkELPj6gc0N5Zi70y8ai2B5SZZiMvBmW6OwQ3YAhdir0oZW9TrAQRs Zq1hV31fylpnToMIZMt4SZ1tuKlT13S6VL5uEbhueNV2IuG/h4/j/0e7Q0DQruQbadR1 A7qw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM532DaFGjiYXCSYrp0p3PMNNtDkcdA8rnRROEbCviOMl8BpEOd/c0 zl8F4Avgrwnyj8+vLJOp8vk= X-Google-Smtp-Source: ABdhPJycbqQX2+7W5ZpAX6kg8ZGPIZy/8TU6ZqnghNNiB5yyeaKGnyrvDUNoSnPw4gG3u/C7ADnLFg== X-Received: by 2002:a63:9518:: with SMTP id p24mr7367272pgd.80.1634566759268; Mon, 18 Oct 2021 07:19:19 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a17:902:e5c1:: with SMTP id u1ls9031278plf.0.gmail; Mon, 18 Oct 2021 07:19:18 -0700 (PDT) X-Received: by 2002:a17:90b:3e84:: with SMTP id rj4mr32009417pjb.177.1634566758585; Mon, 18 Oct 2021 07:19:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634566758; cv=none; d=google.com; s=arc-20160816; b=Y8UU903tIri2eKjO0OcTPwk7QEkBH1Anj+NO2OP4dK6rgnKPOoyMvP2P2C7xX7W6F4 rZSIAIFBP3q6094hc+35sBtXdnmPcJo0K/TjltHCu8nmbiXpwkEZ04VX94gVHWy7Kwb8 1Yykpa8cFD7AYjoEKVZyJDv3zgTgJfC3HPVkdBRHFIWfqICdwyREHbuhwMAbNznt5BsF Z1wzOBNcflwSdXK6+lfFnjnzJKbbwC538HtCSyk/Orc/Br3L+boOBAZ99+8SVRoCGb3f j+lt/gBYqVDuTkgWXrab60d6g+4Axx9tlSdr6N1mkykS03XvvdVUfhZJaZKixrED3z5X wBuA== 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=g8EZiEer47norkOt4YhGAMAN4odF6Q6sP42azaE23rpHxDwrgd1/q3WUflcugW/mle XlklbMu2rsa/Y7jLu8UyjI8LXXhexyv4+R8vfkFxRZLO9cQs4NSgGQ2aDtF0WPSdKjI5 WXQ0RoEj9wKrSvxKzFbu0tETVYcTErXqCv2I3bHUSmzM1WJDtmx0ow0Mifr1fhgV0S8J gTtaioKYnjVbjGlP5D4e4J7wVyNiku6H5OMM3J/fAjNz4A5PgMenYobnRC12cjZ7+YOs hSrKxpUFVBGLVPP2DRBwrAi+1F5fy7hn0Oii+hOkj1yWGNkIRr0aQCrSUomvepHycg8D 9Rzw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=oJrIKhh2; spf=pass (google.com: domain of james.hilliard1@gmail.com designates 2607:f8b0:4864:20::d2e 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-xd2e.google.com (mail-io1-xd2e.google.com. [2607:f8b0:4864:20::d2e]) by gmr-mx.google.com with ESMTPS id o2si90870pjj.1.2021.10.18.07.19.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Oct 2021 07:19:18 -0700 (PDT) Received-SPF: pass (google.com: domain of james.hilliard1@gmail.com designates 2607:f8b0:4864:20::d2e as permitted sender) client-ip=2607:f8b0:4864:20::d2e; Received: by mail-io1-xd2e.google.com with SMTP id e144so16473023iof.3 for ; Mon, 18 Oct 2021 07:19:18 -0700 (PDT) X-Received: by 2002:a05:6602:14d2:: with SMTP id b18mr14612935iow.72.1634566757747; Mon, 18 Oct 2021 07:19:17 -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 w11sm6773555ior.40.2021.10.18.07.19.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Oct 2021 07:19:17 -0700 (PDT) From: James Hilliard To: swupdate@googlegroups.com Cc: James Hilliard Subject: [swupdate] [PATCH v3 3/3] mongoose: Fix compile warnings and add SPDX Date: Mon, 18 Oct 2021 08:19:03 -0600 Message-Id: <20211018141903.74941-3-james.hilliard1@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211018141903.74941-1-james.hilliard1@gmail.com> References: <20211018141903.74941-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=oJrIKhh2; spf=pass (google.com: domain of james.hilliard1@gmail.com designates 2607:f8b0:4864:20::d2e 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