At 04:47 AM 2/4/2003, Vladimir Prus wrote:
>
>Beman, I've just got the following:
>
>gcc.compile
>../../../libs/filesystem/build/bin/gcc-3.2/release/link-static/operations_po
>six_windows.o
>../../../libs/filesystem/src/operations_posix_windows.cpp: In member
>function
> `boost::filesystem::directory_iterator::directory_iterator(const
> boost::filesystem::path&)':
>../../../libs/filesystem/src/operations_posix_windows.cpp:210: warning:
>`const
> char*name' might be used uninitialized in this function
>../../../libs/filesystem/src/operations_posix_windows.cpp: In member
>function
> `boost::filesystem::directory_iterator::directory_iterator(const
> boost::filesystem::path&)':
>../../../libs/filesystem/src/operations_posix_windows.cpp:210: warning:
>`const
> char*name' might be used uninitialized in this function
>../../../libs/filesystem/src/operations_posix_windows.cpp: In function
>`void
> boost::filesystem::copy_file(const boost::filesystem::path&, const
> boost::filesystem::path&)':
>../../../libs/filesystem/src/operations_posix_windows.cpp:383: warning:
>`int
> outfile' might be used uninitialized in this function
>
>This shows up during release builds only. I've looked at warnings, and
>in first case gcc is just not smart enough -- but would be nice to
>eliminate the warning. In the other case the warning is correct, AFAICT.

The second case is actually incorrect too. The indent was wrong on the throw, so it wasn't obvious that an exception is thrown in the only case where outfile isn;t initialized.

I've added otherwise unneeded initialization in both cases to quiet the compiler warnings.

Thanks,

--Beman


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to