------- Comment #4 from Markus dot Elfring at web dot de  2008-02-17 15:52 
-------
(In reply to comment #3)
> The problem is here:
> sipp.cpp(137): error: a value of type "const char *const *" cannot be used to
> initialize an entity of type "void *"
>    {"cid_str", "Call ID string (default [EMAIL PROTECTED]).  %u=call_number,
> %s=ip_address, %p=process_number, %%=% (in any order).", 5, &call_id_string,
> 1},
>                                                                               
>  
>                                                 ^

Thanks for your suggestion.


> sipp.cpp(247): error: a value of type "const char *const *" cannot be used to
> initialize an entity of type "void *"

How did you get this error message? It is different from mine.

Each array element is initialised by five values that were not flagged with
errors before my source code refactoring. Well, I'm sorry - The initialisation
list was too long for me to remember that I updated the data type for two other
global variables that were referenced from the included source file "sipp.hpp".
The message did not point me to my error directly. I suggest to improve the
wording from "an entity" to "entity 'data'" in my use case.
struct sipp_option {
        const char *option;
        const char *help;
        int type;
        void *data;
        int pass;
};


> just add casts to (void *) after taking the addresses.

The specification "void const* data;" would be another design option. It might
not be clear yet which way will be preferred for the concrete application.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35233

Reply via email to