From owner-svn-src-all@freebsd.org Sun Jun 30 20:15:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E1FB15DE12E; Sun, 30 Jun 2019 20:15:03 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D8E7D6DBA8; Sun, 30 Jun 2019 20:15:02 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A93C27B8; Sun, 30 Jun 2019 20:15:02 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5UKF21F011383; Sun, 30 Jun 2019 20:15:02 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5UKF27w011382; Sun, 30 Jun 2019 20:15:02 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201906302015.x5UKF27w011382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sun, 30 Jun 2019 20:15:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349564 - head/stand/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/efi/libefi X-SVN-Commit-Revision: 349564 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D8E7D6DBA8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jun 2019 20:15:03 -0000 Author: tsoome Date: Sun Jun 30 20:15:02 2019 New Revision: 349564 URL: https://svnweb.freebsd.org/changeset/base/349564 Log: Clean efihttp pointer-sign warnings The Http protocol structure is using unsigned char strings, Use type casts where needed. Modified: head/stand/efi/libefi/efihttp.c Modified: head/stand/efi/libefi/efihttp.c ============================================================================== --- head/stand/efi/libefi/efihttp.c Sun Jun 30 19:47:15 2019 (r349563) +++ head/stand/efi/libefi/efihttp.c Sun Jun 30 20:15:02 2019 (r349564) @@ -199,7 +199,7 @@ efihttp_dev_init(void) DevicePathSubType(devpath) != MSG_URI_DP) continue; uri = (URI_DEVICE_PATH *)devpath; - if (strncmp("http", uri->Uri, 4) == 0) + if (strncmp("http", (const char *)uri->Uri, 4) == 0) found_http = true; } if (!found_http) @@ -341,7 +341,7 @@ efihttp_dev_open(struct open_file *f, ...) err = ENOMEM; goto end; } - strncpy(oh->uri_base, uri->Uri, len); + strncpy(oh->uri_base, (const char *)uri->Uri, len); oh->uri_base[len] = '\0'; c = strrchr(oh->uri_base, '/'); if (c != NULL) @@ -468,12 +468,12 @@ _efihttp_fs_open(const char *path, struct open_file *f message.Body = NULL; request.Method = HttpMethodGet; request.Url = calloc(strlen(oh->uri_base) + strlen(path) + 1, 2); - headers[0].FieldName = "Host"; - headers[0].FieldValue = hostp; - headers[1].FieldName = "Connection"; - headers[1].FieldValue = "close"; - headers[2].FieldName = "Accept"; - headers[2].FieldValue = "*/*"; + headers[0].FieldName = (CHAR8 *)"Host"; + headers[0].FieldValue = (CHAR8 *)hostp; + headers[1].FieldName = (CHAR8 *)"Connection"; + headers[1].FieldValue = (CHAR8 *)"close"; + headers[2].FieldName = (CHAR8 *)"Accept"; + headers[2].FieldValue = (CHAR8 *)"*/*"; cpy8to16(oh->uri_base, request.Url, strlen(oh->uri_base)); cpy8to16(path, request.Url + strlen(oh->uri_base), strlen(path)); status = oh->http->Request(oh->http, &token); @@ -542,14 +542,14 @@ _efihttp_fs_open(const char *path, struct open_file *f fh->size = 0; fh->is_dir = false; for (i = 0; i < message.HeaderCount; i++) { - if (strcasecmp(message.Headers[i].FieldName, + if (strcasecmp((const char *)message.Headers[i].FieldName, "Content-Length") == 0) - fh->size = strtoul(message.Headers[i].FieldValue, NULL, - 10); - else if (strcasecmp(message.Headers[i].FieldName, + fh->size = strtoul((const char *) + message.Headers[i].FieldValue, NULL, 10); + else if (strcasecmp((const char *)message.Headers[i].FieldName, "Content-type") == 0) { - if (strncmp(message.Headers[i].FieldValue, "text/html", - 9) == 0) + if (strncmp((const char *)message.Headers[i].FieldValue, + "text/html", 9) == 0) fh->is_dir = true; } }