Module: xenomai-head Branch: master Commit: f4ce133b1b5845cab64240757f6c5b49aca5e807 URL: http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=f4ce133b1b5845cab64240757f6c5b49aca5e807
Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org> Date: Tue Jan 25 05:57:47 2011 +0100 nucleus/types.h: fix compiler error with old compilers Older versions of gcc seem to choke on (src) != NULL when src is an array, force the cast to a pointer. --- include/nucleus/types.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/include/nucleus/types.h b/include/nucleus/types.h index 28726df..8089d5e 100644 --- a/include/nucleus/types.h +++ b/include/nucleus/types.h @@ -110,7 +110,8 @@ typedef atomic_flags_t xnflags_t; #define xnobject_copy_name(dst, src) \ do { \ - strncpy((dst), (src) ?: "", XNOBJECT_NAME_LEN-1) \ + strncpy((dst), \ + ((const char *)(src)) ?: "", XNOBJECT_NAME_LEN-1) \ [XNOBJECT_NAME_LEN-1] = '\0'; \ } while (0) _______________________________________________ Xenomai-git mailing list Xenomai-git@gna.org https://mail.gna.org/listinfo/xenomai-git