Re: [PATCH 4/6] prefix_filename: return newly allocated string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 21, 2017 at 02:23:35PM -0400, Jeff King wrote:

> > worktree.c:265:6: error: to_free may be used uninitialized in this function
> 
> Doh. I had originally written it without the "if (prefix)" and added it
> as a micro-optimization at the end.
> 
> Still, the whole thing compiles fine for me. I find it odd that neither
> gcc nor clang notices the problem on my system. It's quite obviously
> wrong.

Ah, I found it; it is only triggered with -O2. I usually compile with
-O0 during my edit/compile/test cycles.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]