Re: [fossil-users] Apple clang version 4.0 warnings

2012-07-26 Thread Stephan Beal
On Fri, Jul 27, 2012 at 12:41 AM, Joerg Sonnenberger < jo...@britannica.bec.de> wrote: > It is legal, but will trigger a warning with the settings used e.g. by > NetBSD by default. It won't be faster for any self respecting compiler. > In fact, both GCC and Clang will use memset for large enough b

Re: [fossil-users] Apple clang version 4.0 warnings

2012-07-26 Thread Joerg Sonnenberger
On Thu, Jul 26, 2012 at 10:46:52PM +0100, David Given wrote: > On 26/07/12 22:05, Joerg Sonnenberger wrote: > [...] > > It's a popular C&P error. Don't know how many instances of it I fixed in > > various OSS projects... > > FWIW, there's a little-known wrinkle in the C spec that states that > whi

Re: [fossil-users] Apple clang version 4.0 warnings

2012-07-26 Thread Stephan Beal
On Thu, Jul 26, 2012 at 11:46 PM, David Given wrote: > char buffer[80] = {0}; > Thank you! In the past i've written that then always ended up replacing it with memset because i wasn't certain it did "what i wanted" (what you describe). Now i finally know! > > http://stackoverflow.com/questions

Re: [fossil-users] Apple clang version 4.0 warnings

2012-07-26 Thread David Given
On 26/07/12 22:05, Joerg Sonnenberger wrote: [...] > It's a popular C&P error. Don't know how many instances of it I fixed in > various OSS projects... FWIW, there's a little-known wrinkle in the C spec that states that while *un*initialised auto variables have undefined value, and *initialised* a

Re: [fossil-users] Apple clang version 4.0 warnings

2012-07-26 Thread Joerg Sonnenberger
On Thu, Jul 26, 2012 at 07:49:45PM +0200, Stephan Beal wrote: > On Thu, Jul 26, 2012 at 7:43 PM, Doug Currie wrote: > > > It's saying that you are only clearing the first pointer of struct path > > rather than the whole structure; it should be: > > > > memset(&path, 0, sizeof(path)); > > > >

Re: [fossil-users] newbie questions - rollback a single file and checkin/checkout/rollback of a whole directory

2012-07-26 Thread Stephan Beal
On Thu, Jul 26, 2012 at 9:15 PM, Marc St. Onge wrote: > changes. We realize that some other aspect of File A corrupted at some > point over that week and wish to rollback just File A to the beginning of > the week, but retain all changes to other files that were committed during > the week. A w

[fossil-users] newbie questions - rollback a single file and checkin/checkout/rollback of a whole directory

2012-07-26 Thread Marc St. Onge
I'm testing out Fossil for a small project that needs source control and a bug tracker. It looks quite nice except that I can't quite figure out two things that I need to accomplish. Please excuse me if I don't quite have all of the terminology correct yet. My Fossil repository is structured as a

Re: [fossil-users] Apple clang version 4.0 warnings

2012-07-26 Thread Stephan Beal
On Thu, Jul 26, 2012 at 7:43 PM, Doug Currie wrote: > It's saying that you are only clearing the first pointer of struct path > rather than the whole structure; it should be: > > memset(&path, 0, sizeof(path)); > Thanks for the clarification. That might have been done as a small optimization

Re: [fossil-users] Apple clang version 4.0 warnings

2012-07-26 Thread Doug Currie
On Jul 26, 2012, at 1:25 PM, Stephan Beal wrote: > > ./src/md5.c:269:31: warning: argument to 'sizeof' in '__builtin___memset_chk' > call is the same expression as the destination; did you mean to dereference > it? [-Wsizeof-pointer-memaccess] > memset(ctx, 0, sizeof(ctx));/* In ca

Re: [fossil-users] temp files safe to delete?

2012-07-26 Thread Richard Hipp
On Thu, Jul 26, 2012 at 2:06 AM, Themba Fletcher wrote: > I had fossil's parent process crash during a commit with autopush on. > > > $ fossil version >> This is fossil version 1.20 [a75e2d2504] 2011-10-21 12:52:53 UTC >> > > > Subsequent 'fossil push' seems to have finished the job, and I don't

Re: [fossil-users] Apple clang version 4.0 warnings

2012-07-26 Thread Stephan Beal
On Thu, Jul 26, 2012 at 7:25 PM, Stephan Beal wrote: > On Thu, Jul 26, 2012 at 7:12 PM, Doug Currie wrote: > >> Wtautological-compare] >> if( p->iCursor<0 ){ >> > > IIRC, the blob class used to use "long" instead of unsigned it, which is > where that comes from. i've just removed it. > FWIW: t

Re: [fossil-users] Apple clang version 4.0 warnings

2012-07-26 Thread Stephan Beal
On Thu, Jul 26, 2012 at 7:12 PM, Doug Currie wrote: > cc -I/usr/include -Wdeprecated-declarations -g -O2 -DHAVE_AUTOCONFIG_H > -I. -I./src -Ibld -o bld/blob.o -c bld/blob_.c > ./src/blob.c:444:17: warning: comparison of unsigned expression < 0 is > always false [-Wtautological-compare] > if(

[fossil-users] Apple clang version 4.0 warnings

2012-07-26 Thread Doug Currie
Here are some interesting warnings from clang compiling trunk today: fossil e$ cc --version Apple clang version 4.0 (tags/Apple/clang-421.0.57) (based on LLVM 3.1svn) Target: x86_64-apple-darwin12.0.0 Thread model: posix cc -I/usr/include -Wdeprecated-declarations -g -O2 -DHAVE_AUTOCONFIG_H -I