[
https://issues.apache.org/jira/browse/PROTON-772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14244760#comment-14244760
]
ASF subversion and git services commented on PROTON-772:
--------------------------------------------------------
Commit c0abbe5289e555bbea5ca3ddf6e0ec7244b1ffdb in qpid-proton's branch
refs/heads/master from [~aconway]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=c0abbe5 ]
PROTON-772: Avoid use of GNU extension ## command deletion.
The following idiom is GNU C specific:
-#define pn_logf(fmt, ...)
- pn_logf_impl(fmt , ##__VA_ARGS__);
The use of ## after a comma deletes the comma if __VA_ARGS__ is empty, so the
above works
even if there is no argument after fmt.
The following is more portable:
+#define pn_logf(...)
+ pn_logf_impl(__VA_ARGS__);
Now fmt is included in the variadic argument list so it is never empty. This is
slightly less self-descriptive since it doesn't correspond as well to the
signature of pn_logf_impl(fmt, ...), but it is standard C99.
> Remove all direct printing to stdout and stderr.
> ------------------------------------------------
>
> Key: PROTON-772
> URL: https://issues.apache.org/jira/browse/PROTON-772
> Project: Qpid Proton
> Issue Type: Bug
> Components: proton-c
> Affects Versions: 0.8
> Reporter: Alan Conway
> Assignee: Alan Conway
> Fix For: 0.3
>
>
> A library should never, ever print anything directly to stdout/stderr unless
> explicitly requested to do so, as it may be linked with programs that need to
> control what they output to stdout/err or programs that have no stdout/err at
> all.
> Failures should be raised via the API error mechanism with appropriate
> message strings that the caller can display as they see fit. Informational
> log messages should be logged in a way that the caller can send them where
> they want or turn them off if they want.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)