[PATCH] Fix CppCheck errors

2015-09-01 Thread Martin Galvan
This patch fixes the following CppCheck errors found throughout the code: [c/src/lib/libbsp/shared/umon/umon.h:21]: (error) Invalid number of character ({) when these macros are defined: '__cplusplus'. [cpukit/libmisc/dumpbuf/dumpbuf.c:69]: (error) Undefined behavior: Variable 'line_buffer' is

Re: cppcheck errors

2015-09-01 Thread Martin Galvan
Hi everyone! I just ran CppCheck again on a fresh clone of the git repo and saw the number of error reports was quite smaller than what I reported before. That's because my previous run was on a (quite older) version; most of those must've been fixed already. Some of the error reports remain,

Re: [rtems commit] Add __synch_synchronize function for arm

2015-09-01 Thread Sebastian Huber
This file lacks a license header. On 01/08/15 19:20, Joel Sherril wrote: Module:rtems Branch:4.11 Commit:1cf91e0b0a6e93a5344a9b4fc6c09f44ff95d1e2 Changeset: http://git.rtems.org/rtems/commit/?id=1cf91e0b0a6e93a5344a9b4fc6c09f44ff95d1e2 Author:Jan Sommer

Re: [PATCH] [RTEMS] Update RTEMS thread model

2015-09-01 Thread Chris Johns
On 1/09/2015 8:52 pm, Daniel Gutson wrote: > > El 31/7/2015 3:28, "Chris Johns" > escribió: >> >> On 31/07/2015 4:11 pm, Sebastian Huber wrote: >> > For synchronization objects use the self-contained objects available via >> > Newlib . >> > >> > >

Re: [PATCH 4/4] cpukit/libmisc/dumpbuf/dumpbuf.c: Fix undefined behavior for sprintf().

2015-09-01 Thread Joel Sherrill
On September 1, 2015 8:33:54 PM CDT, Daniel Gutson wrote: >Is there any reason to not declare these variables as unsigned (int)? >IIUC strlen returns an unsigned integral. Sign-correctnesd doesn't hurt >and I saw many bugs caused by the lack of it (the

Re: [PATCH 4/4] cpukit/libmisc/dumpbuf/dumpbuf.c: Fix undefined behavior for sprintf().

2015-09-01 Thread Daniel Gutson
El 1/9/2015 23:10, "Joel Sherrill" escribió: > > > > On September 1, 2015 8:33:54 PM CDT, Daniel Gutson < daniel.gut...@tallertechnologies.com> wrote: > >Is there any reason to not declare these variables as unsigned (int)? > >IIUC strlen returns an unsigned integral.

Re: [PATCH 4/4] cpukit/libmisc/dumpbuf/dumpbuf.c: Fix undefined behavior for sprintf().

2015-09-01 Thread Daniel Gutson
Is there any reason to not declare these variables as unsigned (int)? IIUC strlen returns an unsigned integral. Sign-correctnesd doesn't hurt and I saw many bugs caused by the lack of it (the last one being pushed few says ago in the Chromium beowser). El 1/9/2015 18:41, "Joel Sherrill"

Re: cppcheck errors

2015-09-01 Thread Joel Sherrill
On 9/1/2015 2:10 PM, Martin Galvan wrote: Hi everyone! I just ran CppCheck again on a fresh clone of the git repo and saw the number of error reports was quite smaller than what I reported before. That's because my previous run was on a (quite older) version; most of those must've been fixed

[PATCH 4/4] cpukit/libmisc/dumpbuf/dumpbuf.c: Fix undefined behavior for sprintf().

2015-09-01 Thread Joel Sherrill
Updates #2405. --- cpukit/libmisc/dumpbuf/dumpbuf.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cpukit/libmisc/dumpbuf/dumpbuf.c b/cpukit/libmisc/dumpbuf/dumpbuf.c index 9d34d42..36a8656 100644 --- a/cpukit/libmisc/dumpbuf/dumpbuf.c +++

[PATCH 3/4] tools/cpu/nios2/ptf.c: Fix leak of memory pointed to by new_prefix

2015-09-01 Thread Joel Sherrill
Updates #2405. --- tools/cpu/nios2/ptf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/cpu/nios2/ptf.c b/tools/cpu/nios2/ptf.c index 7a31c11..2b9448c 100644 --- a/tools/cpu/nios2/ptf.c +++ b/tools/cpu/nios2/ptf.c @@ -578,6 +578,7 @@ void ptf_printf(FILE *s, struct ptf *tree, char

[PATCH 1/4] various .h files: Add missing C++ extern wrappers

2015-09-01 Thread Joel Sherrill
Updates #2405. --- c/src/lib/libbsp/shared/umon/umon.h | 4 cpukit/posix/include/rtems/posix/ptimer.h| 4 cpukit/rtems/include/rtems/rtems/dpmemimpl.h | 4 3 files changed, 12 insertions(+) diff --git a/c/src/lib/libbsp/shared/umon/umon.h

Re: [PATCH] [RTEMS] Update RTEMS thread model

2015-09-01 Thread Sebastian Huber
On 31/07/15 09:23, Sebastian Huber wrote: On 31/07/15 09:10, Chris Johns wrote: On 31/07/2015 4:44 pm, Sebastian Huber wrote: > >>Is this for 4.12 ? > >This is just a proof-of-concept patch, but it would be nice to include >this in the next release along with the C11 threads support. >

Re: [PATCH] [RTEMS] Update RTEMS thread model

2015-09-01 Thread Daniel Gutson
El 31/7/2015 3:28, "Chris Johns" escribió: > > On 31/07/2015 4:11 pm, Sebastian Huber wrote: > > For synchronization objects use the self-contained objects available via > > Newlib . > > > >

[PATCH] [RTEMS] Update RTEMS thread model

2015-09-01 Thread Sebastian Huber
For synchronization objects use the self-contained objects available via Newlib . https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=commit;h=ecaef05f6601f1e8acb78fb65b411a258f39988a Enable the C++11 threads using . So, the threads are only supported in case the POSIX API is enabled in

Re: [PATCH] [RTEMS] Update RTEMS thread model

2015-09-01 Thread Sebastian Huber
On 01/09/15 12:10, Sebastian Huber wrote: Shared mutexes are not implemented in general. This works now also: https://gcc.gnu.org/ml/gcc-patches/2015-09/msg00027.html -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16

[PATCH] posix: glibc compatibility

2015-09-01 Thread Sebastian Huber
--- cpukit/posix/src/setcancelstate.c | 7 +++ cpukit/posix/src/setcanceltype.c| 7 +++ testsuites/psxtests/psxcancel/init.c| 8 testsuites/psxtests/psxcancel/psxcancel.scn | 6 +++--- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git