[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: uninitialized variable 'path' is used (Re: svn commit: r16388 - in trunk/subversion: include libsvn_fs libsvn_fs_fs)

From: Max Bowsher <maxb_at_ukf.net>
Date: 2005-10-02 14:52:07 CEST

Kouhei Sutou wrote:
> Hi,
>
> In <200510011713.j91HD5014100@morbius.ch.collab.net>
> "svn commit: r16388 - in trunk/subversion: include libsvn_fs
> libsvn_fs_fs"
> on Sat, 1 Oct 2005 12:13:05 -0500, maxb@tigris.org wrote:
>
>> Author: maxb
>> Date: Sat Oct 1 12:13:05 2005
>> New Revision: 16388
>>
>> Modified:
>> trunk/subversion/libsvn_fs/fs-loader.c
>
>> Log:
>> Fix numerous bugs in the svn_fs_*berkeley*() APIs.
>
>> * subversion/libsvn_fs/fs-loader.c
>> (svn_fs_hotcopy): Read the fs-type file only once, and cause a fs-type
>> file to be added to the destination even if the source was a 1.0
>> repository created before the inception of fs-type files.
>
>> Modified: trunk/subversion/libsvn_fs/fs-loader.c
>> Url:
>> http://svn.collab.net/viewcvs/svn/trunk/subversion/libsvn_fs/fs-loader.c?rev=16388&p1=trunk/subversion/libsvn_fs/fs-loader.c&p2=trunk/subversion/libsvn_fs/fs-loader.c&r1=16387&r2=16388
>> ==============================================================================
>> --- trunk/subversion/libsvn_fs/fs-loader.c (original) +++
>> trunk/subversion/libsvn_fs/fs-loader.c Sat Oct 1 12:13:05 2005
>> @@ -389,17
>> +389,12 @@ {
>> fs_library_vtable_t *vtable;
>> const char *path;
>> - svn_node_kind_t kind;
>> + const char *fs_type;
>>
>> - SVN_ERR (fs_library_vtable (&vtable, src_path, pool));
>> + SVN_ERR (svn_fs_type (&fs_type, path, pool));
>
> 'path' is uninitialized. Is this 'src_path'?

Ooops!

Thank you very much for pointing this out.

Many apologies for committing such a stupid thing in the first place - it
turns
out gcc's -Wuninitialized is disabled if optimization is not enabled!

/me adds -O2 to my permanent EXTRA_CFLAGS...

Max.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Oct 2 14:52:57 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.