From patchwork Mon Oct 1 21:30:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 147935 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp4394051lji; Mon, 1 Oct 2018 14:31:08 -0700 (PDT) X-Google-Smtp-Source: ACcGV60hkeUklE8/wMLV4Y1tMjvaHx3aERVMY4BgLD8yXTs2g2k0wxhpRGBqD1cWhSlFULJHojGl X-Received: by 2002:a17:902:3fa5:: with SMTP id a34-v6mr13657796pld.244.1538429468088; Mon, 01 Oct 2018 14:31:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538429468; cv=none; d=google.com; s=arc-20160816; b=N/hM7Wq06jvE7JqBT9bhYJEWJVSmz6f/DxOCIcSH72sB0fLEczqM0QOxnAZI4wfcZh GIWM3PMYFbDLayZiHPtQ+h2r4dbB8z2LtdcKKRzZeLprqjzI5IkiKKywSiYPR+zbtSFa wk10a0QBSZMc0u8f223JLT/EAeeiSC6FE7iI6oD0nPDceb5r5UaUDWhpKnU37hIywc4Z 1TP4xaYpXOs3LG9qb3jfGM3keDuxpGXwRXlEI3NICmFB8LzpTPmcfCvFhv2XZu7wU5yP i2euvpHvH+KIjOy3F01T4sbp8EhhBlenV9JrzP4wCPwhr9AR8xSF5UD1iWMdh8sryyYK 6QAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:mime-version:dkim-signature :delivered-to:sender:list-help:list-post:list-archive:list-subscribe :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature; bh=Wz04pynjbyZSxfdsiZzUtzirfPgSetfkz5aTzOLhT44=; b=OBDtY0qgEWaZzMLQwa7fLzfRC8gC5QbUwROMtE/eNMAIATMP5bYE5Xdp+GYQd1uGBC eOukA8XEsQtmSdF0Idz1+Ffltg9P05sJLV6avSwAOeLlOTAZF0NWfFDbnhFdFKHvq6PU LWaJ02OceOc0di1Z5tA7nGZVzvj/Zm8IhEY8EAeHZyRveYugHvYFlAP58cS56JIVAS7S MLHZjWJDhkzhE7brFqYzJRXQY9ujOxXpYqjqqCyNr1ZTSmZi/J4EdBy3+7vSFrkl/0kf 3VGAOJRCY3K05+EVwDKMdWqv1x7LDOlxAcTbxJJb1V3YM3qjoagGjOy1f880u28W3kST ZmIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=cOYhKXEW; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=WMbg+vwl; spf=pass (google.com: domain of newlib-return-16504-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="newlib-return-16504-patch=linaro.org@sourceware.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id x22-v6si13040357pfh.84.2018.10.01.14.31.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Oct 2018 14:31:08 -0700 (PDT) Received-SPF: pass (google.com: domain of newlib-return-16504-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=cOYhKXEW; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=WMbg+vwl; spf=pass (google.com: domain of newlib-return-16504-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="newlib-return-16504-patch=linaro.org@sourceware.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:from:date:message-id:subject:to :content-type; q=dns; s=default; b=pPTPBzeMW/FqgUnrCO/k/C44XSTCs LJwZ6NkYhZ/fDWrGeXzEDWsvX1O2IvDF75yl9hNy7ANYhF2gqGOm/o8fBq+NOy4b B3U6+vvXpI8OJ5sI6cXEv+mL8qmPcY6p49yueSSv4uHJp/LJwU6j4diHeFt9Hijk WQvy3RQN+XkHUs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:from:date:message-id:subject:to :content-type; s=default; bh=n556hI7E75cNBcm/+DgtvgH6hXg=; b=cOY hKXEWn+x/cVmfD1IuarU8DWfcQ00etyyHvCLikMIBKgPjnXLD++Z76DOrqUMKY3f Eel29/T70l70npmvmm0gqY2k9dz1HvyvEfS4xJ5Hzn7dsK/y/M6NDz8HaBg6eyAb vCbIgoI3+fXp+gcXiHWgv6Kh9Bw/Lo7d1FrX99kk= Received: (qmail 33685 invoked by alias); 1 Oct 2018 21:30:45 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Delivered-To: mailing list newlib@sourceware.org Received: (qmail 33640 invoked by uid 89); 1 Oct 2018 21:30:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=6629 X-HELO: mail-ua1-f49.google.com Received: from mail-ua1-f49.google.com (HELO mail-ua1-f49.google.com) (209.85.222.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 01 Oct 2018 21:30:42 +0000 Received: by mail-ua1-f49.google.com with SMTP id b3so2178692uak.3 for ; Mon, 01 Oct 2018 14:30:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:from:date:message-id:subject:to; bh=V+GjT5bDiAv0xkh6eUqefZo/gK4YYvfZXggAgpLtiOQ=; b=WMbg+vwlIbHmiO09QCIOuus1BtrwxBHcT/8ZsiwN4lv/o3CcD1ugzw8bMCy+woIBlF JMoysSegL834AbM0rIPIZhHV9gPLfz2JLlmQ1n4rOw9e+SlYXLafcDYQeeeL7JMmBG0N 63ZtSNrzzctMQBJyvO+2Yi63dq4RfP+7OGi3U= MIME-Version: 1.0 From: Christophe Lyon Date: Mon, 1 Oct 2018 23:30:29 +0200 Message-ID: Subject: [ARM] Cast string pointers to int to avoid compiler warnings. To: newlib@sourceware.org X-IsSubscribed: yes Hi, While building newlib for ARM, I noticed that GCC complains about implicit casts. This small patch makes them explicit, just like in other parts of the same source file. OK? Christophe commit e923f12ef309d1d79df7bc7c324966a9f647605b Author: Christophe Lyon Date: Mon Oct 1 17:22:43 2018 +0000 [ARM] Cast string pointers to int to avoid compiler warnings. 2018-10-01 Christophe Lyon * newlib/libc/sys/arm/syscalls.c (_unlink): Cast 'path' to int. (_system): Cast 's' to int. (_rename): Cast 'newpath' and 'oldpath' to int. diff --git a/newlib/libc/sys/arm/syscalls.c b/newlib/libc/sys/arm/syscalls.c index 6d2ad79..d871464 100644 --- a/newlib/libc/sys/arm/syscalls.c +++ b/newlib/libc/sys/arm/syscalls.c @@ -542,7 +542,7 @@ _unlink (const char *path __attribute__ ((unused))) { #ifdef ARM_RDI_MONITOR int block[2]; - block[0] = path; + block[0] = (int) path; block[1] = strlen(path); return wrap (do_AngelSWI (AngelSWI_Reason_Remove, block)) ? -1 : 0; #else @@ -635,7 +635,7 @@ _system (const char *s) meaning to its return value. Try to do something reasonable.... */ if (!s) return 1; /* maybe there is a shell available? we can hope. :-P */ - block[0] = s; + block[0] = (int) s; block[1] = strlen (s); e = wrap (do_AngelSWI (AngelSWI_Reason_System, block)); if ((e >= 0) && (e < 256)) @@ -662,9 +662,9 @@ _rename (const char * oldpath, const char * newpath) { #ifdef ARM_RDI_MONITOR int block[4]; - block[0] = oldpath; + block[0] = (int) oldpath; block[1] = strlen(oldpath); - block[2] = newpath; + block[2] = (int) newpath; block[3] = strlen(newpath); return wrap (do_AngelSWI (AngelSWI_Reason_Rename, block)) ? -1 : 0; #else