mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 06:11:37 +08:00
Fix some warnings and fix some simulator builds
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4688 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
+1
-1
@@ -140,7 +140,7 @@ int prctl(int option, ...)
|
||||
/* The returned value will be null-terminated, truncating if necessary */
|
||||
|
||||
strncpy(name, tcb->name, CONFIG_TASK_NAME_SIZE-1);
|
||||
name[CONFIG_TASK_NAME_SIZE-1];
|
||||
name[CONFIG_TASK_NAME_SIZE-1] = '\0';
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/************************************************************************
|
||||
* sched/pthread_exit.c
|
||||
*
|
||||
* Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009, 2011-2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
@@ -92,7 +93,7 @@
|
||||
|
||||
void pthread_exit(FAR void *exit_value)
|
||||
{
|
||||
int error_code = (int)exit_value;
|
||||
int error_code = (int)((intptr_t)exit_value);
|
||||
int status;
|
||||
|
||||
sdbg("exit_value=%p\n", exit_value);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/****************************************************************************
|
||||
* sched/sem_open.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Copyright (C) 2007, 2008, 2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/****************************************************************************
|
||||
* sched/sig_deliver.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Copyright (C) 2007, 2008, 2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -86,7 +86,6 @@
|
||||
|
||||
void sig_deliver(FAR _TCB *stcb)
|
||||
{
|
||||
pid_t rpid;
|
||||
FAR sigq_t *sigq;
|
||||
FAR sigq_t *next;
|
||||
sigset_t savesigprocmask;
|
||||
@@ -129,12 +128,6 @@ void sig_deliver(FAR _TCB *stcb)
|
||||
savesigprocmask = stcb->sigprocmask;
|
||||
stcb->sigprocmask = savesigprocmask | sigq->mask | SIGNO2SET(sigq->info.si_signo);
|
||||
|
||||
/* The current tasks process.ID. We'll need this later to see if
|
||||
* the signal handler caused a context switch.
|
||||
*/
|
||||
|
||||
rpid = getpid();
|
||||
|
||||
/* Deliver the signal */
|
||||
|
||||
(*sigq->action.sighandler)(sigq->info.si_signo, &sigq->info, NULL);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/****************************************************************************
|
||||
* sched/wd_start.c
|
||||
*
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -294,7 +294,6 @@ int wd_start(WDOG_ID wdog, int delay, wdentry_t wdentry, int argc, ...)
|
||||
|
||||
void wd_timer(void)
|
||||
{
|
||||
pid_t pid;
|
||||
FAR wdog_t *wdog;
|
||||
|
||||
/* Check if there are any active watchdogs to process */
|
||||
@@ -333,12 +332,6 @@ void wd_timer(void)
|
||||
|
||||
wdog->active = false;
|
||||
|
||||
/* Get the current task's process ID. We'll need this later to
|
||||
* see if the watchdog function caused a context switch.
|
||||
*/
|
||||
|
||||
pid = getpid();
|
||||
|
||||
/* Execute the watchdog function */
|
||||
|
||||
up_setpicbase(wdog->picbase);
|
||||
|
||||
Reference in New Issue
Block a user