C++ and deprecated conversion from string constant to ‘char*’

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

C++ and deprecated conversion from string constant to ‘char*’

Craig McQueen
I'm using libconfuse from a C++ program. It works okay, however for every config option specified with CFG_STR(), CFG_INT(), etc, I get a C++ compiler warning:

warning: deprecated conversion from string constant to ‘char*’

It seems that this is because struct cfg_opt field name is 'char *' rather than 'const char *', and typical usage is to provide it a const string e.g.

CFG_STR("log-config", "log.conf", CFGF_NONE),

So, would it be possible for  struct cfg_opt field name to become 'const char *'?

Regards,
Craig McQueen

_______________________________________________
Confuse-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/confuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: C++ and deprecated conversion from string constant to ‘char*’

Oscar Koeroo
Hi Craig,

I had the same exact issue. I solved it by making a local patch, but I would love to see this upstream.

Oscar

Craig McQueen <[hidden email]> schreef:
I'm using libconfuse from a C++ program. It works okay, however for every config option specified with CFG_STR(), CFG_INT(), etc, I get a C++ compiler warning:

warning: deprecated conversion from string constant to ‘char*’

It seems that this is because struct cfg_opt field name is 'char *' rather than 'const char *', and typical usage is to provide it a const string e.g.

CFG_STR("log-config", "log.conf", CFGF_NONE),

So, would it be possible for struct cfg_opt field name to become 'const char *'?

Regards,
Craig McQueen



Confuse-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/confuse-devel

--
Verzonden van mijn Android telefoon met K-9 Mail.
_______________________________________________
Confuse-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/confuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: C++ and deprecated conversion from string constant to ‘char*’

Craig McQueen
Hello,

I see there has been no activity in the git repository for 3 years. What is the development status of libconfuse?

Can it be moved to github? It's more likely to attract contributions since github makes it easy to fork and do pull requests. Also it would be good to have a proper issue tracker which is better than a mailing list.

There are already some libconfuse forks on github:
https://github.com/scunningham/libConfuse
https://github.com/stricaud/libconfuse

Regards,
Craig McQueen

From: Oscar Koeroo <[hidden email]>
Sent: Tuesday, 18 June 2013 5:32 PM
To: Craig McQueen; [hidden email]
Subject: Re: [Confuse-devel] C++ and deprecated conversion from string constant to ‘char*’
 
Hi Craig,

I had the same exact issue. I solved it by making a local patch, but I would love to see this upstream.

Oscar


Craig McQueen <[hidden email]> schreef: I'm using libconfuse from a C++ program. It works okay, however for every config option specified with CFG_STR(), CFG_INT(), etc, I get a C++ compiler warning:

warning: deprecated conversion from string constant to ‘char*’

It seems that this is because struct cfg_opt field name is 'char *' rather than 'const char *', and typical usage is to provide it a const string e.g.

CFG_STR("log-config", "log.conf", CFGF_NONE),

So, would it be possible for  struct cfg_opt field name to become 'const char *'?

Regards,
Craig McQueen


Confuse-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/confuse-devel
 
--
Verzonden van mijn Android telefoon met K-9 Mail.  
_______________________________________________
Confuse-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/confuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: C++ and deprecated conversion from string constant to ‘char*’

Martin Hedenfalk-4
Hi,

I've moved the main source repository to github at https://github.com/martinh/libconfuse.

I intend to move libconfuse off of Savannah completely, and to shut down this mailing list, unless someone objects.

        .martin

10 jan 2014 kl. 03:31 skrev Craig McQueen <[hidden email]>:

> Hello,
>
> I see there has been no activity in the git repository for 3 years. What is the development status of libconfuse?
>
> Can it be moved to github? It's more likely to attract contributions since github makes it easy to fork and do pull requests. Also it would be good to have a proper issue tracker which is better than a mailing list.
>
> There are already some libconfuse forks on github:
> https://github.com/scunningham/libConfuse
> https://github.com/stricaud/libconfuse
>
> Regards,
> Craig McQueen
>
> From: Oscar Koeroo <[hidden email]>
> Sent: Tuesday, 18 June 2013 5:32 PM
> To: Craig McQueen; [hidden email]
> Subject: Re: [Confuse-devel] C++ and deprecated conversion from string constant to ‘char*’
>  
> Hi Craig,
>
> I had the same exact issue. I solved it by making a local patch, but I would love to see this upstream.
>
> Oscar
>
>
> Craig McQueen <[hidden email]> schreef: I'm using libconfuse from a C++ program. It works okay, however for every config option specified with CFG_STR(), CFG_INT(), etc, I get a C++ compiler warning:
>
> warning: deprecated conversion from string constant to ‘char*’
>
> It seems that this is because struct cfg_opt field name is 'char *' rather than 'const char *', and typical usage is to provide it a const string e.g.
>
> CFG_STR("log-config", "log.conf", CFGF_NONE),
>
> So, would it be possible for  struct cfg_opt field name to become 'const char *'?
>
> Regards,
> Craig McQueen
>
>
> Confuse-devel mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/confuse-devel
>
> --
> Verzonden van mijn Android telefoon met K-9 Mail.  
> _______________________________________________
> Confuse-devel mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/confuse-devel


_______________________________________________
Confuse-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/confuse-devel
Reply | Threaded
Open this post in threaded view
|

moving out of Savannah (was Re: C++ and deprecated conversion from string constant to ?char*?)

Carlo Marcelo Arenas Belon
On Sun, Jan 12, 2014 at 06:08:19PM +0100, Martin Hedenfalk wrote:
>
> I intend to move libconfuse off of Savannah completely, and to shut down
> this mailing list, unless someone objects.

IMHO the email list is still useful to discuss items that might not have code
associated with them and a good place to look for old discussions[1] which
might be relevant.

even if the website is moved into github pages can we keep the email list
and its archives?

also, could we create a libconfuse team in github to help manage the code?

Carlo

[1] http://lists.nongnu.org/archive/html/confuse-devel/ (and others)

_______________________________________________
Confuse-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/confuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: moving out of Savannah (was Re: C++ and deprecated conversion from string constant to ?char*?)

Daniel Pocock-2


On 16/01/14 20:24, Carlo Marcelo Arenas Belon wrote:

> On Sun, Jan 12, 2014 at 06:08:19PM +0100, Martin Hedenfalk wrote:
>>
>> I intend to move libconfuse off of Savannah completely, and to shut down
>> this mailing list, unless someone objects.
>
> IMHO the email list is still useful to discuss items that might not have code
> associated with them and a good place to look for old discussions[1] which
> might be relevant.
>
> even if the website is moved into github pages can we keep the email list
> and its archives?
>
> also, could we create a libconfuse team in github to help manage the code?
>

I'm sure we could adopt it under the Ganglia organisation in github or
set it up as an organisation in its own right.

I'd potentially volunteer to co-maintain it.


_______________________________________________
Confuse-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/confuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: moving out of Savannah (was Re: C++ and deprecated conversion from string constant to ?char*?)

Martin Hedenfalk-4
On Thu, Jan 16, 2014 at 08:29:15PM +0100, Daniel Pocock wrote:

>
>
> On 16/01/14 20:24, Carlo Marcelo Arenas Belon wrote:
> > On Sun, Jan 12, 2014 at 06:08:19PM +0100, Martin Hedenfalk wrote:
> >>
> >> I intend to move libconfuse off of Savannah completely, and to shut down
> >> this mailing list, unless someone objects.
> >
> > IMHO the email list is still useful to discuss items that might not have code
> > associated with them and a good place to look for old discussions[1] which
> > might be relevant.
> >
> > even if the website is moved into github pages can we keep the email list
> > and its archives?
> >
> > also, could we create a libconfuse team in github to help manage the code?
> >
>
> I'm sure we could adopt it under the Ganglia organisation in github or
> set it up as an organisation in its own right.
>
> I'd potentially volunteer to co-maintain it.

is that a commitment to maintain libconfuse?

        .martin

_______________________________________________
Confuse-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/confuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: moving out of Savannah (was Re: C++ and deprecated conversion from string constant to ?char*?)

Martin Hedenfalk-4
In reply to this post by Carlo Marcelo Arenas Belon
On Thu, Jan 16, 2014 at 07:24:23PM +0000, Carlo Marcelo Arenas Belon wrote:

> On Sun, Jan 12, 2014 at 06:08:19PM +0100, Martin Hedenfalk wrote:
> >
> > I intend to move libconfuse off of Savannah completely, and to shut down
> > this mailing list, unless someone objects.
>
> IMHO the email list is still useful to discuss items that might not have code
> associated with them and a good place to look for old discussions[1] which
> might be relevant.
>
> even if the website is moved into github pages can we keep the email list
> and its archives?

moderating all the spam is tiresome. will you do it?

> also, could we create a libconfuse team in github to help manage the code?

what is the difference between a github organization and a regular account with
collaborators?

        .martin

_______________________________________________
Confuse-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/confuse-devel