From e10e3ee3be95c80752090ebde8ae5bdde368c719 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 14 Dec 2012 09:56:26 +1100 Subject: [PATCH] AP_HAL: fixed argv declaration to match getopt() --- libraries/AP_HAL/HAL.h | 2 +- libraries/AP_HAL_AVR/HAL_AVR.cpp | 2 +- libraries/AP_HAL_AVR/HAL_AVR.h | 2 +- libraries/AP_HAL_AVR/HAL_AVR_APM1_Class.cpp | 2 +- libraries/AP_HAL_AVR/HAL_AVR_APM1_Class.h | 2 +- libraries/AP_HAL_AVR/HAL_AVR_APM2_Class.cpp | 2 +- libraries/AP_HAL_AVR/HAL_AVR_APM2_Class.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libraries/AP_HAL/HAL.h b/libraries/AP_HAL/HAL.h index ad65858e20..53a3132991 100644 --- a/libraries/AP_HAL/HAL.h +++ b/libraries/AP_HAL/HAL.h @@ -42,7 +42,7 @@ public: scheduler(_scheduler) {} - virtual void init(int argc, const char *argv[]) const = 0; + virtual void init(int argc, char * const argv[]) const = 0; AP_HAL::UARTDriver* uartA; AP_HAL::UARTDriver* uartB; diff --git a/libraries/AP_HAL_AVR/HAL_AVR.cpp b/libraries/AP_HAL_AVR/HAL_AVR.cpp index 1adcf8f495..bd5552cbd6 100644 --- a/libraries/AP_HAL_AVR/HAL_AVR.cpp +++ b/libraries/AP_HAL_AVR/HAL_AVR.cpp @@ -2,7 +2,7 @@ #include "HAL_AVR.h" using namespace AP_HAL_AVR; -void HAL_AVR::init(int argc, const char *argv[]) const { +void HAL_AVR::init(int argc, char * const argv[]) const { scheduler->init((void*)&isr_registry); diff --git a/libraries/AP_HAL_AVR/HAL_AVR.h b/libraries/AP_HAL_AVR/HAL_AVR.h index 0f6acffbba..b4cc56bde4 100644 --- a/libraries/AP_HAL_AVR/HAL_AVR.h +++ b/libraries/AP_HAL_AVR/HAL_AVR.h @@ -31,7 +31,7 @@ public: _console, _gpio, _rcin, _rcout, _scheduler) {} - void init(int argc, const char *argv[]) const; + void init(int argc, char * const argv[]) const; AP_HAL_AVR::ISRRegistry isr_registry; }; #endif // __AP_HAL_AVR_HAL_AVR_H__ diff --git a/libraries/AP_HAL_AVR/HAL_AVR_APM1_Class.cpp b/libraries/AP_HAL_AVR/HAL_AVR_APM1_Class.cpp index 43cd325e5c..eb328d658d 100644 --- a/libraries/AP_HAL_AVR/HAL_AVR_APM1_Class.cpp +++ b/libraries/AP_HAL_AVR/HAL_AVR_APM1_Class.cpp @@ -50,7 +50,7 @@ HAL_AVR_APM1::HAL_AVR_APM1() : &avrScheduler ) {} -void HAL_AVR_APM1::init(int argc, const char *argv[]) const { +void HAL_AVR_APM1::init(int argc, char * const argv[]) const { scheduler->init((void*)&isrRegistry); diff --git a/libraries/AP_HAL_AVR/HAL_AVR_APM1_Class.h b/libraries/AP_HAL_AVR/HAL_AVR_APM1_Class.h index e343e3bc47..f63911ce41 100644 --- a/libraries/AP_HAL_AVR/HAL_AVR_APM1_Class.h +++ b/libraries/AP_HAL_AVR/HAL_AVR_APM1_Class.h @@ -20,7 +20,7 @@ class HAL_AVR_APM1 : public AP_HAL::HAL { public: HAL_AVR_APM1(); - void init(int argc, const char *argv[]) const; + void init(int argc, char * const argv[]) const; }; /** diff --git a/libraries/AP_HAL_AVR/HAL_AVR_APM2_Class.cpp b/libraries/AP_HAL_AVR/HAL_AVR_APM2_Class.cpp index dc69b3e59b..6de61f6526 100644 --- a/libraries/AP_HAL_AVR/HAL_AVR_APM2_Class.cpp +++ b/libraries/AP_HAL_AVR/HAL_AVR_APM2_Class.cpp @@ -49,7 +49,7 @@ HAL_AVR_APM2::HAL_AVR_APM2() : &avrScheduler ) {} -void HAL_AVR_APM2::init(int argc, const char *argv[]) const { +void HAL_AVR_APM2::init(int argc, char * const argv[]) const { scheduler->init((void*)&isrRegistry); diff --git a/libraries/AP_HAL_AVR/HAL_AVR_APM2_Class.h b/libraries/AP_HAL_AVR/HAL_AVR_APM2_Class.h index 08f30b9a7e..ddadbc6bd6 100644 --- a/libraries/AP_HAL_AVR/HAL_AVR_APM2_Class.h +++ b/libraries/AP_HAL_AVR/HAL_AVR_APM2_Class.h @@ -20,7 +20,7 @@ class HAL_AVR_APM2 : public AP_HAL::HAL { public: HAL_AVR_APM2(); - void init(int argc, const char *argv[]) const; + void init(int argc, char * const argv[]) const; }; /**