Commit Graph

37385 Commits

Author SHA1 Message Date
Joel Sherrill
cce1823e40 contrib/cpukit/uuid/gen_uuid.c: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
53d6794ea5 cpukit/libmisc/rtems-fdt/rtems-fdt-shell.c: Correct file header
The @file block was below the license and should have been above it.
2025-09-26 22:38:34 +00:00
Joel Sherrill
cf0a338520 cpukit/libcsupport/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
3b5ecfc5ac cpukit/posix/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
a96d3f6b49 cpukit/rtems/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
af86ade836 cpukit/sapi/src/rbheap.c: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
787e5a3a76 cpukit/score/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
b7ec902ea8 sptests/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:35:12 +00:00
Joel Sherrill
a8448ce123 tmtests/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:32:49 +00:00
Joel Sherrill
fd0123a7ef cpukit/include/rtems/rtems/timerimpl.h: Used unsigned type for mask
This addresses an issue found by the GCC -Wsign-compare warning.
The code was using a signed type for a bit mask.
2025-09-26 22:29:56 +00:00
Joel Sherrill
bf949e0526 testsuites/psxtest/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:29:13 +00:00
Joel Sherrill
788f4ee4b8 cpukit/libmisc/shell/hexdump-parse.c: Fix fall through warning
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.
2025-09-26 16:43:25 -05:00
Joel Sherrill
d8737d61cd testsuites/.../*: Address unused parameter warnings
These files are included or compiled multiple times. Any warning
in these results in many warning instances. Found with GCC's warning
-Wunused-paramter.
2025-09-25 14:41:34 -05:00
Joel Sherrill
748758758b testsuites/validation/*: Address unused parameter warnings
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.
2025-09-25 14:41:34 -05:00
Joel Sherrill
9c44cf0090 jffs2: Address unused parameter warnings
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.
2025-09-25 14:41:34 -05:00
Joel Sherrill
81dd232071 bsps/include/acpi/acpica/acpixf.h: Address unused parameter warnings
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.
2025-09-25 14:41:34 -05:00
Joel Sherrill
86f00b3183 cpukit/include/.../*.h: Address unused parameter warnings
These files are included multiple times and any warning in these
results in many warning instances. Found with GCC's warning
-Wunused-paramter.
2025-09-25 14:41:34 -05:00
Kinsey Moore
19151f01ae cpukit/jffs2: Resolve errors with debug enabled 2025-09-24 13:20:46 -05:00
Kinsey Moore
7da577f8e6 bsps/shared/dev/flash: Enforce maximum JFFS2 filesystem size
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.
2025-09-22 15:52:43 -05:00
Chris Johns
f30157f988 libdebugger: Add SMP support for ARM
Make the aarch64 SMP support a separate file and share it between
aarch64 and arm.
2025-09-22 20:51:58 +00:00
Kinsey Moore
75e7f5cb80 cpukit/flashdev: Add unregister call and private data destructor
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.
2025-09-22 10:04:58 -05:00
Michal Lenc
e8de13e0c5 cpukit/dev/can/can-bittiming.c: remove calls to abs()
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>
2025-09-20 20:47:14 +02:00
Kinsey Moore
3b60c421ca bsps/arm/xilinx-zynq: Add Xilinx compatibility layer
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.
2025-09-20 09:48:31 +10:00
Jeremy Lorelli
d8ba01ec52 cpukit: Raise internal error if we cannot open stdin with fileno 0
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.
2025-09-20 08:57:16 +10:00
Jeremy Lorelli
897a8d3094 libchip/ds1375: Refactor to use i2c-rtc driver
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.
2025-09-20 08:57:16 +10:00
Kinsey Moore
53c427773f cpukit/libfs/jffs2: Remove secondary stale version
The version referenced in the first sentence has become stale and
redundant. Remove it in favor of the version in the command below.
2025-09-20 08:10:08 +10:00
Joel Sherrill
e45ebbc5c1 bsps/*: Correct implicit fallthrough warnings
Use RTEMS_FALL_THROUGH() to annotate case statements which
intentionally do not have a break statement.
2025-09-19 19:02:25 +00:00
Joel Sherrill
106363b29d cpukit/*: Correct implicit fallthrough warnings
Use RTEMS_FALL_THROUGH() to annotate case statements which
intentionally do not have a break statement.
2025-09-19 19:02:25 +00:00
Joel Sherrill
fef5e18ada contrib/*/xz/xz_dec_stream.c: Correct implicit fallthrough warnings
Use RTEMS_FALL_THROUGH() to annotate case statements which
intentionally do not have a break statement.
2025-09-19 19:02:25 +00:00
Joel Sherrill
38c0f48f53 cpukit/include/rtems/score/basedefs.h: Add RTEMS_FALL_THROUGH()
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.
2025-09-19 19:02:25 +00:00
Joel Sherrill
fa84f51442 testsuites/validation/tx-call-within-isr.c: Address dangling pointer
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().
2025-09-19 19:01:31 +00:00
Joel Sherrill
ad60ce8c2c bsps/*acpi*: Address unterminated string warnings
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
2025-09-19 18:56:55 +00:00
Joel Sherrill
78e050f603 cpukit/score/src/kern_ntptime.c: Negative Shift Value Warning
The code in question was shifting a signed integer. This was
caught by the -Wshift-negative-value GCC warning.

Closes #5339.
2025-09-18 17:48:06 -05:00
Gedare Bloom
948bbec7f6 shell: add noreturn attribute to err.h 2025-09-18 14:14:15 -06:00
Joel Sherrill
fd9f54ed23 pipe support: Update attribution email and relicense to 2-BSD
Wei Shen gave permission to relicense and asked to change the
email address to match that used on GitHub.

Updates #3053.
2025-09-18 09:26:39 -05:00
Joel Sherrill
21a6957d18 testsuites/sptests/sp34/changepri.c: Remove include of tm27-default.h
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.
2025-09-18 07:45:35 -05:00
Christian Mauderer
1bb370b644 cpukit/jffs2: Fix unaligned writes
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.
2025-09-17 15:12:27 +02:00
Joel Sherrill
ba3acfd3d0 misc: Fix empty body warnings
Address the small number of cases where an empty body occurred in
an if, else, or do while.
2025-09-15 16:25:37 +00:00
Joel Sherrill
4728346362 testsuites/sptests/sp*: Update attribution per git history
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.
2025-09-15 16:24:50 +00:00
Joel Sherrill
76d37a714e libdebugger/rtems-debugger-arm.c: Fix using defined() in expansion
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.
2025-09-15 16:24:17 +00:00
Joel Sherrill
4beeafe1d7 m68k/genmcf548x: Add attribution for embedded brains
Per git commit history, these files were submitted by Thomas
Doerfler. They have given permission.

Update #3053.
2025-09-15 16:22:13 +00:00
Joel Sherrill
600b76286e arm/smdk2410: Add proper attribution
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.
2025-09-12 09:46:03 -05:00
Joel Sherrill
3e7776db83 spedfsched03: Relicense to 2-BSD
This code was submitted by Petr Benes who has given permission
to relicense.

Updates #3053.
2025-09-11 10:04:52 -05:00
Mazen Adel Elmessady
f929bcba5b cpukit/posix: Added pthread clock functions
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
2025-09-10 19:56:50 +00:00
Kinsey Moore
509ce2fde4 cpukit/flashdev: Remove unnecessary reinitialization 2025-09-10 18:56:24 +00:00
Joel Sherrill
c4b62666c7 m68k/av5282: Add license and attribution as appropriate
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.
2025-09-10 18:53:59 +00:00
Joel Sherrill
6dacc5bd9a testsuites/sptests/sp29/init.c: Add attribution and license
This file was added in 1999 by me per git history.
2025-09-10 18:52:51 +00:00
Joel Sherrill
2f0133e582 bsps/powerpc/gen5200/include/tm27.h: Add attriibution and 2-BSD
This file was mechanically split from bsp.h which was submitted
by Thomas Doerfler. Updating license and SPDX to reflect that.
2025-09-09 16:45:12 -05:00
Joel Sherrill
888e5a5d25 bsps/*: Correct spelling of copyright
Multiple files had this spelled incorrectly.
2025-09-09 11:43:24 -05:00
Joel Sherrill
f2bbe99804 cpukit/.../m68k/qsm.h, sim.h: Update to Two Paragraph BSD
John Gwynne gave permission to relicense his submissions to
Two Paragraph BSD.

Updates #3053.
2025-09-09 16:13:02 +00:00