From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: Xenomai core <Xenomai-core@domain.hid>
Subject: Re: [Xenomai-core] [Xenomai-git] Jan Kiszka : rt_print: Provide rt_puts
Date: Sun, 31 Jul 2011 19:46:54 +0200 [thread overview]
Message-ID: <4E35950E.6000900@domain.hid> (raw)
In-Reply-To: <4E359412.4090309@domain.hid>
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.
next prev parent reply other threads:[~2011-07-31 17:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
2011-07-31 18:12 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E35950E.6000900@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=Xenomai-core@domain.hid \
--cc=jan.kiszka@domain.hid \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.