nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [incubator-nuttx] patacongo opened a new issue #1086: include/nuttx/sensors/ioctl.h macros defined and redefined.
Date Wed, 20 May 2020 02:20:56 GMT

patacongo opened a new issue #1086:

   This was Issue 178 in the old Bitbucket repository
   David Alessio
   created an issue 2019-11-07
   SNIOC_START is defined 3 times. Other macros may also be.
   Gregory Nutt
   Certainly SNIOC_STOP is also defined multiple times.
   Other than the warnings this produces (and the overall aesthetics), this is not really
a problem.
   The easiest solution would be to add a group of common IOCTL commands at the top of the
file and move the common definitions.
   The commands are, however, only common in name not function. So a more proper solution
would be rename all of the IOCTL commands, adding the device name to the IOCTL command name.
That would nicely clean up the namespace (but would be a really tedious job). Someone who
really cares about sensor drivers should take this on someday.
   David Alessio
   The output of awk '/#define/ {print $2}' include/nuttx/sensors/ioctl.h | sort | uniq -d
   suggested fix: replace all duplicate #define statements with a comment similar to: /* SNIOC_START
see above */
   ioctl cmds need only be unique within a particular driver, they need not be unique across
all drivers.

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

View raw message