#2137 closed defect (fixed)

rtems_rfs_rtems_initialise() prototype differs from implementation and rtems_filesystem_fsmount_me_t (missing void* data parameter), causes compile-time warning

Reported by: Nick Withers Owned by: Chris Johns
Priority: normal Milestone: 4.11
Component: fs Version: 4.11
Severity: trivial Keywords:
Cc: nick.withers@… Blocked By:
Blocking:

Description

The rtems_rfs_rtems_initialise() prototype in rtems-rfs.h states that the function takes only an rtems_filesystem_mount_table_entry_t parameter, and not a "const void *data", per its implementation and rtems_filesystem_fsmount_me_t.

This causes a warning to be generated when CONFIGURE_FILESYSTEM_RFS is defined as a (by default) "{ RTEMS_FILESYSTEM_TYPE_RFS, rtems_rfs_rtems_initialise }" entry is added to rtems_filesystem_table_t rtems_filesystem_table in confdefs.h, where the second argument should be a function pointer of rtems_filesystem_fsmount_me_t type, e.g.:

powerpc-rtems4.11-gcc --pipe -std=c99 -g -Wall -Wpointer-arith -mcpu=powerpc -msoft-float -Dppc_generic -I. -I/home/nick/rtems/rtems-4.11/powerpc-rtems4.11/mvme3100/lib/include -I/home/nick/rtems/RTEMS_gdb_stub_1_5 -O0 -DDEBUG=1 -DDEBUG_GDB_STUB=1 -DDEBUG_INIT_DONE_RESET=0 -DDEBUG_HALT_ON_FATAL=0 -DSINGLES_SPECTRUM_LITTLE_ENDIAN -c -o init.o init.c
In file included from init.h:88:0,

from init.c:23:

/home/nick/rtems/rtems-4.11/powerpc-rtems4.11/mvme3100/lib/include/rtems/confdefs.h:514:9: warning: initialization from incompatible pointer type [enabled by default]

CONFIGURE_FILESYSTEM_ENTRY_RFS,


The attached patch adds the "const void* data" parameter to the header declaration.

Attachments (2)

rtems-rfs.h.patch (454 bytes) - added by Nick Withers on Aug 8, 2013 at 10:59:24 PM.
Patch adding "const void* data" parameter to rtems_rfs_rtems_initialize()'s declaration, matching its definition
rtems_bugzilla_2137.patch (892 bytes) - added by Nick Withers on Aug 9, 2013 at 6:42:13 AM.
Patch adding "const void* data" parameter to rtems_rfs_rtems_initialize()'s declaration, matching its definition

Download all attachments as: .zip

Change History (7)

Changed on Aug 8, 2013 at 10:59:24 PM by Nick Withers

Attachment: rtems-rfs.h.patch added

Patch adding "const void* data" parameter to rtems_rfs_rtems_initialize()'s declaration, matching its definition

comment:1 Changed on Aug 9, 2013 at 4:21:38 AM by Nick Withers

Cc: Nick Withers added

comment:2 Changed on Aug 9, 2013 at 5:31:40 AM by Nick Withers

Component: cpukitfilesystem
Owner: changed from Joel Sherrill to Chris Johns

Changed on Aug 9, 2013 at 6:42:13 AM by Nick Withers

Attachment: rtems_bugzilla_2137.patch added

Patch adding "const void* data" parameter to rtems_rfs_rtems_initialize()'s declaration, matching its definition

comment:3 Changed on Aug 9, 2013 at 6:42:13 AM by Nick Withers

attachments.isobsolete: 01

comment:4 Changed on Aug 9, 2013 at 7:26:29 AM by Chris Johns

Resolution: fixed
Status: newclosed

Applied. Thanks.

comment:5 Changed on Nov 24, 2014 at 6:58:28 PM by Gedare Bloom

Version: HEAD4.11

Replace Version=HEAD with Version=4.11 for the tickets with Milestone >= 4.11

Note: See TracTickets for help on using tickets.