[csw-maintainers] Error: Ambiguous "?:" expression

Roger Håkansson hson at opencsw.org
Tue Mar 9 23:33:49 CET 2010


On 2010-03-09 18:34, Philip Brown wrote:
> On Tue, Mar 9, 2010 at 9:28 AM, Jake Goerzen<jgoerzen at opencsw.org>  wrote:
>>
>> "./gui/widgets/generator_private.hpp", line 173: Error:
>> "gui2::policy::placement::thorizontal_list::calculate_best_size()
>> const" is expected to return a value.
>>
>>
>> Approximately line 173 generator_private.hpp:
>>
>>         tpoint calculate_best_size() const
>>                 { ERROR_LOG(false); }
>>
>
>
> that's.... a wierd definition.
> methinks its using gnuism of defaulting to "return null" or something,
> and you will need to do the return explicitly?

ERROR_LOG is defined as:
   if(true) { \
   std::cerr << __FILE__ << ":" << __LINE__ << " ASSSERTION FAILED: " << 
a << std::endl; \
   abort(); \
   } else (void)0


Anyway, I've created a patchfile (/home/hson/generator_private.hpp.diff 
on buildfarm) which at least makes generator.cpp compile, but I can't 
assure for functionality.
Basically I've added "return tpoint(0,0)" for those functions returning 
tpoint and "return NULL" for those returning twidget.


More information about the maintainers mailing list