nxstyle: fixed various nxstyle warnings

This commit is contained in:
Pelle Windestam 2020-03-09 15:21:22 +01:00 committed by patacongo
parent 76aa3dd8ef
commit 7dd5356055
4 changed files with 21 additions and 17 deletions

View File

@ -55,6 +55,7 @@
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* Configuration ************************************************************/ /* Configuration ************************************************************/
/* Number of pre-allocated AIO Control block containers */ /* Number of pre-allocated AIO Control block containers */

View File

@ -124,8 +124,9 @@ int aio_cancel(int fildes, FAR struct aiocb *aiocbp)
aioc && aioc->aioc_aiocbp != aiocbp; aioc && aioc->aioc_aiocbp != aiocbp;
aioc = (FAR struct aio_container_s *)aioc->aioc_link.flink); aioc = (FAR struct aio_container_s *)aioc->aioc_link.flink);
/* Did we find a container for this fildes? We should; the aio_result says /* Did we find a container for this fildes? We should; the
* that the transfer is pending. If not we return AIO_ALLDONE. * aio_result says that the transfer is pending. If not we return
* AIO_ALLDONE.
*/ */
if (aioc) if (aioc)
@ -198,7 +199,8 @@ int aio_cancel(int fildes, FAR struct aiocb *aiocbp)
{ {
/* Remove the container from the list of pending transfers */ /* Remove the container from the list of pending transfers */
next = (FAR struct aio_container_s *)aioc->aioc_link.flink; next =
(FAR struct aio_container_s *)aioc->aioc_link.flink;
pid = aioc->aioc_pid; pid = aioc->aioc_pid;
aiocbp = aioc_decant(aioc); aiocbp = aioc_decant(aioc);
DEBUGASSERT(aiocbp); DEBUGASSERT(aiocbp);

View File

@ -165,17 +165,18 @@ static void aio_fsync_worker(FAR void *arg)
* referenced by aiocbp becomes an illegal address prior to asynchronous * referenced by aiocbp becomes an illegal address prior to asynchronous
* I/O completion, then the behavior is undefined. * I/O completion, then the behavior is undefined.
* *
* If the aio_fsync() function fails or aiocbp indicates an error condition, * If the aio_fsync() function fails or aiocbp indicates an error
* data is not guaranteed to have been successfully transferred. * condition, data is not guaranteed to have been successfully transferred.
* *
* Input Parameters: * Input Parameters:
* op - Should be either O_SYNC or O_DSYNC. Ignored in this implementation. * op - Should be either O_SYNC or O_DSYNC. Ignored in this
* implementation.
* aiocbp - A pointer to an instance of struct aiocb * aiocbp - A pointer to an instance of struct aiocb
* *
* Returned Value: * Returned Value:
* The aio_fsync() function will return the value 0 if the I/O operation is * The aio_fsync() function will return the value 0 if the I/O operation is
* successfully queued; otherwise, the function will return the value -1 and * successfully queued; otherwise, the function will return the value -1
* set errno to indicate the error. * and set errno to indicate the error.
* *
* The aio_fsync() function will fail if: * The aio_fsync() function will fail if:
* *
@ -193,8 +194,8 @@ static void aio_fsync_worker(FAR void *arg)
* operation, which can be retrieved using aio_error(). * operation, which can be retrieved using aio_error().
* *
* POSIX Compliance * POSIX Compliance
* - NuttX does not currently make any distinction between O_DYSNC and O_SYNC. * - NuttX does not currently make any distinction between O_DYSNC and
* Hence, the 'op' argument is ignored altogether. * O_SYNC. Hence, the 'op' argument is ignored altogether.
* - Most errors required in the standard are not detected at this point. * - Most errors required in the standard are not detected at this point.
* There are no pre-queuing checks for the validity of the operation. * There are no pre-queuing checks for the validity of the operation.
* *
@ -205,7 +206,7 @@ int aio_fsync(int op, FAR struct aiocb *aiocbp)
FAR struct aio_container_s *aioc; FAR struct aio_container_s *aioc;
int ret; int ret;
DEBUGASSERT(op == O_SYNC /* || op == O_DSYNC */); DEBUGASSERT(op == O_SYNC); /* || op == O_DSYNC */
DEBUGASSERT(aiocbp); DEBUGASSERT(aiocbp);
/* The result -EINPROGRESS means that the transfer has not yet completed */ /* The result -EINPROGRESS means that the transfer has not yet completed */

View File

@ -204,12 +204,12 @@ errout:
* *
* If O_APPEND is not set for the file descriptor aio_fildes, then the * If O_APPEND is not set for the file descriptor aio_fildes, then the
* requested operation will take place at the absolute position in the file * requested operation will take place at the absolute position in the file
* as given by aio_offset, as if lseek() were called immediately prior to the * as given by aio_offset, as if lseek() were called immediately prior to
* operation with an offset equal to aio_offset and a whence equal to SEEK_SET. * the operation with an offset equal to aio_offset and a whence equal to
* If O_APPEND is set for the file descriptor, write operations append to the * SEEK_SET. If O_APPEND is set for the file descriptor, write operations
* file in the same order as the calls were made. After a successful call to * append to the file in the same order as the calls were made. After a
* enqueue an asynchronous I/O operation, the value of the file offset for the * successful call to enqueue an asynchronous I/O operation, the value of
* file is unspecified. * the file offset for the file is unspecified.
* *
* The aiocbp->aio_lio_opcode field will be ignored by aio_write(). * The aiocbp->aio_lio_opcode field will be ignored by aio_write().
* *