The case did not have a break because it was calling a function
which should have been marked as "__dead". It was calling a
function which was marked "__dead". Apparently the analysis
did not see through the extra layer.
These files are included or compiled multiple times. Any warning
in these results in many warning instances. Found with GCC's warning
-Wunused-paramter.
Fixed many warnings for unused parameters. Some cases were
a simple matter of adding "(void) param" at the beginning
of the function, while others required ensuring that addition
was inside the proper conditional section. Found with GCC's
warning -Wunused-paramter.
The files impacted by this change are part of the RTEMS specific
port and do not need to be conditional on RTEMS. Found with GCC's
warning -Wunused-paramter.
This is a third party file and the debug macros create unused
parameter warnings when debugging is not enabled. There are
multiple macros with layers. Rather than attempt to unwind all
this, disabled the -Wunused-parameter GCC warning around the
short block of code causing these warnings.
The maximum size of JFFS2 is 4GB minus the block size of the flash.
Enforce this limitation when setting up a filesystem on a flashdev
region that is larger than the maximum.
This also resolves some off-nominal memory leaks.
This adds an API call allowing for unregistration to include destruction
of private data that is not managed by the flashdev framework. This also
updates the existing consumers of flashdev to use the new private data
destructor callback.
Using abs() on unsigned integers leads to GCC warning -Wabsolute-value.
This commit removes the calls to abs() and replaces them with ternary
conditional operator. This keeps the correct error calculation
previously ensured by abs() call.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
This adds the Xilinx compatibility layer for use with various Xilinx
libraries. The first consumer of this will be lwIP support for the
Zynq7000 platform.
If someone manages to open a file before rtems_libio_post_driver is run,
open() may allocate a file number other than 0 for stdin. This leads to
a silent failure of the logic in rtems_libio_post_driver, and confusing
behavior because your BSP behaves as if it doesn't have a console.
Instead of failing silently, raise an internal error if open() succeeds
but gives us an unexpected file number for stdin.
Previously this RTC was using the file system-based i2c interface in
/dev. Since the RTC is initialized pretty early on during system init,
we call open() before stdin/stdout/stderr have been opened. RTEMS
assumes that stdin == 0, stdout == 1, etc., and fails when that isn't
the case. In particular, when stdin != 0, RTEMS assumes that it wasn't
configured with a console driver and skips opening stdout/stderr,
leading to confusing issues with the standard I/O streams.
The RTEMS_FALL_THROUGH macro was needed to provide a portable
way to annotate that a case in a switch statement intentionally
does not have a break statement. It is known as "falling through"
and a common bug.
Adding this macro enabled addressing -Wimplicit-fallthrough warnings.
On the genmcf548x BSP variants, the "request" local variable was
flagged as having a pointer taken and passed to subroutines. GCC
is unable to detect that the "request" variable is removed from
the chain in an ISR. Disabled -Wdangling-pointer for the single
test function CallWithinISR().
The ACPI source has multiple tables where a Name field is defined.
The name field is a character array with a length of 4. All of the
string initializers are four characters plus a NUL. The code is
careful to use strn*() functions and intentionally avoids assuming
there is space for the NUL. With lots of entries in the various
arrays, this was clearly a design decision to save space.
This was caught by GCC's -Wunterminated-string-initialization
warning. The solution used is to use the "nonstring" attribute
recommended by the GCC manual.
Closes#5329
The file tm27-default.h is considered an internal flag. Accidentally
copying and pasting this include in while fixing attribution headers
was a mistake. Removing the line.
The code in flashio.c had a special case for handling unaligned buffers
during writes. That code did roughly the following:
If the size or start address of the buffer is not aligned to a word:
* align the size up to the next word
* create a temp buffer on heap or stack with the new size
* copy the data from write buffer to this temp buffer
* write the temp buffer with the _new_ size to the flash
* tell the code above, that the original size has been written
That means, that in certain cases, one to three random bytes have been
written to the flash. That is definitively not correct.
The special cases that trigger the behaviour seem to happen quite often
when using the RTEMS functions to unpack a .tar.gz with files in the
range of a few megabytes stored on the JFFS2 file system to the same
file system.
The RTEMS interface for flash drivers doesn't define any alignment
requirements. Therefore that code is not necessary and can just be
removed to solve these issues.
These files were written by Joel Sherrill with some being based
on descriptions from user reports.
testsuites/sptests/sp34/changepri.c
testsuites/sptests/sp52/sp52impl.h
testsuites/sptests/sp67/init.c
Updates #3053.
The definition of NEEDS_THUMB_SWITCH was not portable and flagged by
the GCC -Wexpansion-to-defined. It is not portable to expand a macro
which uses futher cpp directives.
Closes#5328.
This change adds attribution as appropriate for Ray Xu, Jay Monkman,
and Philippe Simons. The attribution is based on git archeology and
current permissions to relicense. Some of the code given attribution
was from the gp32 BSP which required looking at the 4.8 branch to
get attribution.
- Work by Ray Xu and Jay Monkman is now 2-BSD
- Work by Philipe Simon is GPL 2.0 w/RTEMS exception
Updates #3053.
Added pthread_cond_clockwait(), pthread_mutex_clocklock()
pthread_rwlock_clockrdlock() and pthread_rwlock_clockwrlock()
that are new in POSIX Issue 8. Also added tests.
The implementation used the timed versions of these functions
as a reference.
Updates
rtems/programs/gsoc#69
This change reflects adding attribution based on the initial
submitter per git history. Most files were from Eric Norum
and he has given permission to relicense to 2-BSD. One file
was from Mike Bertosh whom we are still trying to contact.
That file is assumed to have been submitted under the GPL
w/exception as was the norm when it was submitted.