public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Michael Jones <mjones@linear.com>
To: Daniel Zebralla <daniel.zebralla@zebralla-it.de>
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] Typo in assert error message causing confusion?
Date: Tue, 01 Oct 2013 15:27:00 -0000	[thread overview]
Message-ID: <B1E5ED67-1FE7-43FF-B3A3-E37D58D8A3E8@linear.com> (raw)
In-Reply-To: <1380618091882-245807.post@n7.nabble.com>

Daniel,

I think it is printing the assertion, not the failure.

It would be clearer if it printed:

Assertion "data pointer NNN is valid" failed

But it might be consistent with standard practice. I am not sure.

Mike



On Oct 1, 2013, at 3:01 AM, Daniel Zebralla <daniel.zebralla@zebralla-it.de> wrote:

>> From /host/infra/cyg_ass.h as well as /host/infra/cyg/infra/cyg_ass.h:
> 
> # define CYG_CHECK_DATA_PTRC( _ptr_ )                   \
>         CYG_MACRO_START                                \
>         if ( !cyg_check_data_ptr((void *)(_ptr_)))     \
>             CYG_ASSERT_DOCALL("data pointer (" #_ptr_ ") is valid");\
>         CYG_MACRO_END
> 
> # define CYG_CHECK_FUNC_PTRC( _ptr_ )                       \
>         CYG_MACRO_START                                    \
>         if ( !cyg_check_func_ptr((void (*)(void))(_ptr_))) \
>             CYG_ASSERT_DOCALL("function pointer (" #_ptr_ ") is valid"); \
>         CYG_MACRO_END
> 
> As I understand, CYG_ASSERT_DOCALL is triggered when the checked data or
> function pointer is invalid. The printed message however indicates that the
> checked pointer is valid. Is this an error or am I misunderstanding the
> usage of CYG_ASSERT_DOCALL here?
> 
> Thanks for clarification!
> 
> 
> 
> --
> View this message in context: http://sourceware-org.1504.n7.nabble.com/Typo-in-assert-error-message-causing-confusion-tp245807.html
> Sent from the Sourceware - ecos-discuss mailing list archive at Nabble.com.
> 
> -- 
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
> 


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

  reply	other threads:[~2013-10-01 15:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-01  9:01 Daniel Zebralla
2013-10-01 15:27 ` Michael Jones [this message]
2013-10-02 11:26   ` [ECOS] " Daniel Zebralla
2013-10-02 12:00     ` Stanislav Meduna

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=B1E5ED67-1FE7-43FF-B3A3-E37D58D8A3E8@linear.com \
    --to=mjones@linear.com \
    --cc=daniel.zebralla@zebralla-it.de \
    --cc=ecos-discuss@ecos.sourceware.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).