bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] [PATCH] fix warning and possible invalid free


From: Micah Cowan
Subject: Re: [Bug-wget] [PATCH] fix warning and possible invalid free
Date: Thu, 12 Apr 2012 12:46:11 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120302 Thunderbird/11.0

On 04/12/2012 01:23 AM, TeeRasen wrote:
> In main.c we have
>           opt.progress_type = "dot";

In C, a string literal is of type char[] (which automatically transforms
to char*), not const char[] or const char* (even though one must still
not modify it. You're either compiling with C++ (a bad idea for wget
code), or a nonstandard C invocation that makes string literals out to
be const. (Though, a C implementation is allowed to "warn" about
whatever it wishes, provided it still behaves properly, I suppose.)

-mjc



reply via email to

[Prev in Thread] Current Thread [Next in Thread]