From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20430 invoked by alias); 7 Jun 2014 19:43:58 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32745 Received: (qmail 2258 invoked from network); 7 Jun 2014 19:43:47 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=RKUz3KTaCQQCyiby+QY3ySRlCCd33QpnsUlIxz46nCE=; b=CysvGrgK1VC3Qgzo7avI7M87P4+V1SK48gx85b/bWSr8p7w66e+N/2s8sKxMMUdTOV O8kZhqazO0RHfRYA1OpQU6G/E0zl3se2Q5g6BDtbyKQUcXYZpdzYVsI2U+kQKcvePbBw jchv5bpzhnsEatNxTbiXrhOOmVQEosiS/ZTi94pY2jOJe7H/Nfjx+5qRX2IUjBJGJcEL dsufm+pj5zEkEx9kDvNjgRbHqn5GXo3phpH+UG0Hvbb0Q0UO9yve5IyFy94TqNneWDP0 KTko6/3bCTY/s+tExFOF4DOa7kS0i5Pk9GxZHnjqBOdZmEEu3mJb9mIdeTSHYoNELg1N OLCg== X-Received: by 10.15.53.1 with SMTP id q1mr2145125eew.7.1402170223961; Sat, 07 Jun 2014 12:43:43 -0700 (PDT) Sender: Nikolas Garofil Message-ID: <53936B6E.4020403@garofil.be> Date: Sat, 07 Jun 2014 21:43:42 +0200 From: Nikolas Garofil User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: zsh-workers@zsh.org Subject: Re: [PATCH 1/6] fix implicit typecast for strict compilers References: <1402161535-20756-1-git-send-email-nikolas@garofil.be> <140607120439.ZM24985@torch.brasslantern.com> <5393645B.7050409@garofil.be> <140607123601.ZM25178@torch.brasslantern.com> In-Reply-To: <140607123601.ZM25178@torch.brasslantern.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 06/07/2014 09:36 PM, Bart Schaefer wrote: > On Jun 7, 9:13pm, Nikolas Garofil wrote: > } > } > Wouldn't the right thing here be to declare > } > > } > const char *p1, *p2; > } > > } > instead of casting? > } > } The p1 and p2 pointers are increased at the end of the line to walk > } through the string so that wouldn't work > > The "s" pointer is declared const char * and it's incremented as well. > I'm not suggesting "char * const p1". Sorry, misread it. Feel free to make the values constant, it shouldn't give any problems as long as the pointers can change.