Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753663AbYJTQvT (ORCPT ); Mon, 20 Oct 2008 12:51:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752252AbYJTQvB (ORCPT ); Mon, 20 Oct 2008 12:51:01 -0400 Received: from terminus.zytor.com ([198.137.202.10]:45031 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751670AbYJTQvA (ORCPT ); Mon, 20 Oct 2008 12:51:00 -0400 Message-ID: <48FCB694.40901@zytor.com> Date: Mon, 20 Oct 2008 09:49:24 -0700 From: "H. Peter Anvin" User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: Linus Torvalds CC: Ingo Molnar , Roland Dreier , Andrew Morton , "David S. Miller" , Alan Cox , linux-kernel@vger.kernel.org, Peter Zijlstra , Thomas Gleixner , David Howells Subject: Re: [announce] new tree: "fix all build warnings, on all configs" References: <20081017171139.GA1792@elte.hu> <20081017180523.GA11590@elte.hu> <20081017191202.GA5396@elte.hu> <20081018082209.GA24220@elte.hu> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1071 Lines: 34 Linus Torvalds wrote: > > The old code was correct. Your code is shit. And you didn't fix > _anything_. > >> case 5: >> *(int *)to = *(int *)from; >> - *((short *)to + 3) = *((short *)from + 3); >> + *((char *)(to + 3)) = *((char *)(from + 3)); >> return to; > > Are you just making changes by randomly inserting and deleting characters > until you don't see warnings? Or what? > > That thing is supposed to be a 5-byte memcpy. Not a "take a random byte > from a random location and move it to another random location". That would > be "randcpy()", not "memcpy()". > That is not a 5-byte memcopy. In *either* version! In the "before" case, it copies bytes 0, 1, 2, 3, 6 and 7. In the "after" case, it copies bytes 0, 1 and 2. Presumably it *should* be: *((char *)to + 4) = *((char *)from + 4); -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/