* Re: [Xenomai-core] [Xenomai-git] Jan Kiszka : rt_print: Provide rt_puts
[not found] <E1QnZD3-00080U-DV@xenomai.org>
@ 2011-07-31 17:21 ` Gilles Chanteperdrix
2011-07-31 17:42 ` Jan Kiszka
0 siblings, 1 reply; 4+ messages in thread
From: Gilles Chanteperdrix @ 2011-07-31 17:21 UTC (permalink / raw)
To: Xenomai core, Jan Kiszka
On 07/31/2011 06:49 PM, GIT version control wrote:
> +int rt_puts(const char *s)
> +{
> + return print_to_buffer(stdout, 0, RT_PRINT_MODE_PUTS, s, NULL);
> +}
gcc for ARM chokes here: it says that NULL can not be converted to a
va_list, however I try it.
--
Gilles.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-core] [Xenomai-git] Jan Kiszka : rt_print: Provide rt_puts
2011-07-31 17:21 ` [Xenomai-core] [Xenomai-git] Jan Kiszka : rt_print: Provide rt_puts Gilles Chanteperdrix
@ 2011-07-31 17:42 ` Jan Kiszka
2011-07-31 17:46 ` Gilles Chanteperdrix
0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2011-07-31 17:42 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: Xenomai core
[-- Attachment #1: Type: text/plain, Size: 890 bytes --]
On 2011-07-31 19:21, Gilles Chanteperdrix wrote:
> On 07/31/2011 06:49 PM, GIT version control wrote:
>> +int rt_puts(const char *s)
>> +{
>> + return print_to_buffer(stdout, 0, RT_PRINT_MODE_PUTS, s, NULL);
>> +}
>
> gcc for ARM chokes here: it says that NULL can not be converted to a
> va_list, however I try it.
Hmm. Does this work?
diff --git a/src/skins/common/rt_print.c b/src/skins/common/rt_print.c
index 186de48..52538d8 100644
--- a/src/skins/common/rt_print.c
+++ b/src/skins/common/rt_print.c
@@ -243,7 +243,9 @@ int rt_printf(const char *format, ...)
int rt_puts(const char *s)
{
- return print_to_buffer(stdout, 0, RT_PRINT_MODE_PUTS, s, NULL);
+ va_list dummy;
+
+ return print_to_buffer(stdout, 0, RT_PRINT_MODE_PUTS, s, dummy);
}
void rt_syslog(int priority, const char *format, ...)
Not really beautiful as well, I know.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Xenomai-core] [Xenomai-git] Jan Kiszka : rt_print: Provide rt_puts
2011-07-31 17:42 ` Jan Kiszka
@ 2011-07-31 17:46 ` Gilles Chanteperdrix
2011-07-31 18:12 ` Jan Kiszka
0 siblings, 1 reply; 4+ messages in thread
From: Gilles Chanteperdrix @ 2011-07-31 17:46 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Xenomai core
On 07/31/2011 07:42 PM, Jan Kiszka wrote:
> On 2011-07-31 19:21, Gilles Chanteperdrix wrote:
>> On 07/31/2011 06:49 PM, GIT version control wrote:
>>> +int rt_puts(const char *s)
>>> +{
>>> + return print_to_buffer(stdout, 0, RT_PRINT_MODE_PUTS, s, NULL);
>>> +}
>>
>> gcc for ARM chokes here: it says that NULL can not be converted to a
>> va_list, however I try it.
>
> Hmm. Does this work?
>
> diff --git a/src/skins/common/rt_print.c b/src/skins/common/rt_print.c
> index 186de48..52538d8 100644
> --- a/src/skins/common/rt_print.c
> +++ b/src/skins/common/rt_print.c
> @@ -243,7 +243,9 @@ int rt_printf(const char *format, ...)
>
> int rt_puts(const char *s)
> {
> - return print_to_buffer(stdout, 0, RT_PRINT_MODE_PUTS, s, NULL);
> + va_list dummy;
> +
> + return print_to_buffer(stdout, 0, RT_PRINT_MODE_PUTS, s, dummy);
> }
>
> void rt_syslog(int priority, const char *format, ...)
>
>
> Not really beautiful as well, I know.
It seems to work now, but some later version of gcc may decide to warn
us that this argument is used without being initialized...
--
Gilles.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-core] [Xenomai-git] Jan Kiszka : rt_print: Provide rt_puts
2011-07-31 17:46 ` Gilles Chanteperdrix
@ 2011-07-31 18:12 ` Jan Kiszka
0 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2011-07-31 18:12 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: Xenomai core
[-- Attachment #1: Type: text/plain, Size: 1239 bytes --]
On 2011-07-31 19:46, Gilles Chanteperdrix wrote:
> On 07/31/2011 07:42 PM, Jan Kiszka wrote:
>> On 2011-07-31 19:21, Gilles Chanteperdrix wrote:
>>> On 07/31/2011 06:49 PM, GIT version control wrote:
>>>> +int rt_puts(const char *s)
>>>> +{
>>>> + return print_to_buffer(stdout, 0, RT_PRINT_MODE_PUTS, s, NULL);
>>>> +}
>>>
>>> gcc for ARM chokes here: it says that NULL can not be converted to a
>>> va_list, however I try it.
>>
>> Hmm. Does this work?
>>
>> diff --git a/src/skins/common/rt_print.c b/src/skins/common/rt_print.c
>> index 186de48..52538d8 100644
>> --- a/src/skins/common/rt_print.c
>> +++ b/src/skins/common/rt_print.c
>> @@ -243,7 +243,9 @@ int rt_printf(const char *format, ...)
>>
>> int rt_puts(const char *s)
>> {
>> - return print_to_buffer(stdout, 0, RT_PRINT_MODE_PUTS, s, NULL);
>> + va_list dummy;
>> +
>> + return print_to_buffer(stdout, 0, RT_PRINT_MODE_PUTS, s, dummy);
>> }
>>
>> void rt_syslog(int priority, const char *format, ...)
>>
>>
>> Not really beautiful as well, I know.
>
> It seems to work now, but some later version of gcc may decide to warn
> us that this argument is used without being initialized...
Yes. I've pushed a cleaner version.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-07-31 18:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1QnZD3-00080U-DV@xenomai.org>
2011-07-31 17:21 ` [Xenomai-core] [Xenomai-git] Jan Kiszka : rt_print: Provide rt_puts Gilles Chanteperdrix
2011-07-31 17:42 ` Jan Kiszka
2011-07-31 17:46 ` Gilles Chanteperdrix
2011-07-31 18:12 ` Jan Kiszka
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.