From owner-svn-src-all@freebsd.org Thu Apr 26 11:01:37 2018 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 59487FAA502; Thu, 26 Apr 2018 11:01:37 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: from mail-wr0-x22b.google.com (mail-wr0-x22b.google.com [IPv6:2a00:1450:400c:c0c::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D33A786FA5; Thu, 26 Apr 2018 11:01:36 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: by mail-wr0-x22b.google.com with SMTP id o15-v6so56323017wro.11; Thu, 26 Apr 2018 04:01:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=AY0YTwcyckRqLfnNWW2yvOwCT06wnfCDNH7Bh7prKJA=; b=HZJ8QiHYLNxu702fXZfdZ8s4p105QLcu4J770skxjHfJnswsGOztffQ6Sv6U4+4zVI Bgsov3jUagokNHtYB/cSGbs5bajb0IpbQsmgU3UaUps41ejbq0K+ADGyyOsGYZXAuR8v 8xU+Xa+qQSjffcMQvj3shH537U5vF7+A7kArN0AAFGTMYfEevN21rXQrHjS/7ZK0/tmx /rbK6xMgMIyiShB3GmxzbVRLMClIdaWBEe9w9mABeCjpHo0ykPgg9bE3Y1swA9cHW/Vv QyaP5IjoGOOETqnMd50K+Qx2Ol6WL+53G6pZudVCfNJEqC4nDPd7jwdXt3RmEjnSbTQS vuNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=AY0YTwcyckRqLfnNWW2yvOwCT06wnfCDNH7Bh7prKJA=; b=moKU8GdT5/+uNa4Fm2xJj4Q9Uu8Oea0rbSw9lsXWRchFgTt/+h7CvW0dSbVYv7gu5K LVkM79hjirk9AqsGfXesI5eSBdDBh++l8sMBYxGaLU686tB09SxV08kP1cztoLMVE9vZ xwQcxU0SXS3lmf7cbeTtHF89y6ozlsbxeD66xaVUyKm9KPt8w56hKQILpaNwbnNAgGcf XvWxywtN7cHXcLPk3fZBTAspy3NBNG5POJtWd/saRMhRvLTosHtdsFHorVExZgndMzOL NJrZdqrfbiPWkDkOV8BWp3SSyLxXyH4Jxk15lXe8aFbz/CPtDo+eB55S4znTsrj+mz6M S5Vg== X-Gm-Message-State: ALQs6tCIkXcaDpRiOK9x0KCxSDhhweDC5ajAXNyOrJPvvIc7d7YxeI0t A1ZnT6o4wIxc5zsrOvo/maAPVYvClr0ftUGTjANtCg== X-Google-Smtp-Source: AIpwx4/jRzKITudHQDrk/saJSkyDY2qglGQKxgzQ54Ff0lJubsiyOVGXBN8JZrZa/fuWHW75RKjbeGUZE8BI5aozeJM= X-Received: by 2002:adf:c792:: with SMTP id l18-v6mr27081780wrg.224.1524740495308; Thu, 26 Apr 2018 04:01:35 -0700 (PDT) MIME-Version: 1.0 Sender: lwhsu.freebsd@gmail.com Received: by 10.28.41.196 with HTTP; Thu, 26 Apr 2018 04:01:34 -0700 (PDT) In-Reply-To: <1524700799.57768.111.camel@freebsd.org> References: <201804251946.w3PJkdkH040243@repo.freebsd.org> <1524700799.57768.111.camel@freebsd.org> From: Li-Wen Hsu Date: Thu, 26 Apr 2018 19:01:34 +0800 X-Google-Sender-Auth: RxhT5dKkJvYbC_iC3eEB5Eu4QlY Message-ID: Subject: Re: svn commit: r333010 - head/sys/mips/mips To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 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: Thu, 26 Apr 2018 11:01:37 -0000 On Thu, Apr 26, 2018 at 7:59 AM, Ian Lepore wrote: > On Wed, 2018-04-25 at 19:46 +0000, Li-Wen Hsu wrote: >> Author: lwhsu (ports committer) >> Date: Wed Apr 25 19:46:39 2018 >> New Revision: 333010 >> URL: https://svnweb.freebsd.org/changeset/base/333010 >> >> Log: >> Fix mips32 build after r332951. >> >> Approved by: jhb >> >> Modified: >> head/sys/mips/mips/pm_machdep.c >> >> Modified: head/sys/mips/mips/pm_machdep.c >> ============================================================================== >> --- head/sys/mips/mips/pm_machdep.c Wed Apr 25 18:59:29 2018 (r333009) >> +++ head/sys/mips/mips/pm_machdep.c Wed Apr 25 19:46:39 2018 (r333010) >> @@ -264,7 +264,7 @@ ptrace_single_step(struct thread *td) >> va = locr0->pc + 4; >> } >> if (td->td_md.md_ss_addr) { >> - printf("SS %s (%d): breakpoint already set at %lx (va %lx)\n", >> + printf("SS %s (%d): breakpoint already set at %zx (va %zx)\n", >> p->p_comm, p->p_pid, td->td_md.md_ss_addr, va); /* XXX */ >> error = EFAULT; >> goto out; >> @@ -500,7 +500,7 @@ ptrace_clear_single_step(struct thread *td) >> >> if (error != 0) { >> log(LOG_ERR, >> - "SS %s %d: can't restore instruction at %lx: %x\n", >> + "SS %s %d: can't restore instruction at %zx: %x\n", >> p->p_comm, p->p_pid, td->td_md.md_ss_addr, >> td->td_md.md_ss_instr); >> } >> > > This isn't right either. %z is for size_t values, both md_ss_addr and > va are integers and a plain %x should be the right format. But it will break mips64: cc1: warnings being treated as errors /home/lwhsu/src/sys/mips/mips/pm_machdep.c: In function 'ptrace_single_step': /home/lwhsu/src/sys/mips/mips/pm_machdep.c:268: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'uintptr_t' [-Wformat] /home/lwhsu/src/sys/mips/mips/pm_machdep.c:268: warning: format '%x' expects type 'unsigned int', but argument 5 has type 'uintptr_t' [-Wformat] /home/lwhsu/src/sys/mips/mips/pm_machdep.c: In function 'ptrace_clear_single_step': /home/lwhsu/src/sys/mips/mips/pm_machdep.c:505: warning: format '%x' expects type 'unsigned int', but argument 5 has type 'uintptr_t' [-Wformat] *** [pm_machdep.o] Error code 1 Another way is cast arguments to uintmax_t and use %jx. Will that be better? Li-Wen -- Li-Wen Hsu https://lwhsu.org