clang warnings again #2055
This commit is contained in:
parent
1d2dfddbc2
commit
47db5d0d99
|
@ -23,7 +23,7 @@
|
|||
#include <time.h>
|
||||
#include "nmea.h"
|
||||
|
||||
long hex2int(char *a, int len) {
|
||||
static long hex2int(char *a, int len) {
|
||||
int i;
|
||||
long val = 0;
|
||||
|
||||
|
@ -35,7 +35,7 @@ long hex2int(char *a, int len) {
|
|||
return val;
|
||||
}
|
||||
|
||||
int str2int(char *a, int len) {
|
||||
static int str2int(char *a, int len) {
|
||||
int i = 0, k = 0;
|
||||
while (i<len) {
|
||||
k = (k<<3)+(k<<1)+(*a)-'0';
|
||||
|
@ -45,7 +45,7 @@ int str2int(char *a, int len) {
|
|||
return k;
|
||||
}
|
||||
|
||||
float gps_deg_dec(float deg_point) {
|
||||
static float gps_deg_dec(float deg_point) {
|
||||
float ddeg;
|
||||
float sec = modff(deg_point, &ddeg) * 60;
|
||||
int deg = (int) (ddeg / 100);
|
||||
|
@ -59,7 +59,7 @@ float gps_deg_dec(float deg_point) {
|
|||
}
|
||||
|
||||
// Convert lat e lon to decimals (from deg)
|
||||
void gps_convert_deg_to_dec(float *latitude, char ns, float *longitude, char we) {
|
||||
static void gps_convert_deg_to_dec(float *latitude, char ns, float *longitude, char we) {
|
||||
float lat = (ns == 'N') ? *latitude : -1 * (*latitude);
|
||||
float lon = (we == 'E') ? *longitude : -1 * (*longitude);
|
||||
|
||||
|
@ -68,7 +68,7 @@ void gps_convert_deg_to_dec(float *latitude, char ns, float *longitude, char we)
|
|||
}
|
||||
|
||||
// in string collect all char till comma and convert to float
|
||||
int str_till_comma(char *a, char *dStr) {
|
||||
static int str_till_comma(char *a, char *dStr) {
|
||||
|
||||
int i = 0, sLen = strlen(a);
|
||||
if (sLen > GPS_MAX_STRING)
|
||||
|
|
|
@ -77,7 +77,6 @@
|
|||
|
||||
/*
|
||||
* Stack debugging
|
||||
* See also getMaxUsedStack()
|
||||
*/
|
||||
EXTERNC int getRemainingStack(thread_t *otp);
|
||||
int CountFreeStackSpace(const void* wabase);
|
||||
|
|
|
@ -568,7 +568,7 @@ void exportAllTriggers() {
|
|||
|
||||
fprintf(fp, "# duty %.2f %.2f\n", shape->expectedDutyCycle[0], shape->expectedDutyCycle[1]);
|
||||
|
||||
for (int i = 0; i < shape->getLength(); i++) {
|
||||
for (size_t i = 0; i < shape->getLength(); i++) {
|
||||
|
||||
int triggerDefinitionCoordinate = (shape->getTriggerWaveformSynchPointIndex() + i) % shape->getSize();
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ typedef unsigned int time_t;
|
|||
* project-wide default thread stack size
|
||||
* See also PORT_INT_REQUIRED_STACK
|
||||
* See getRemainingStack()
|
||||
* See getMaxUsedStack() and CountFreeStackSpace()
|
||||
* See CountFreeStackSpace()
|
||||
* See "threadsinfo" command cmd_threads
|
||||
*/
|
||||
#ifndef UTILITY_THREAD_STACK_SIZE
|
||||
|
|
|
@ -42,7 +42,7 @@ EngineTestHelper::EngineTestHelper(engine_type_e engineType, configuration_callb
|
|||
Sensor::setMockValue(SensorType::Clt, 70);
|
||||
Sensor::setMockValue(SensorType::Iat, 30);
|
||||
|
||||
for (const auto [s, v] : sensorValues) {
|
||||
for (const auto& [s, v] : sensorValues) {
|
||||
Sensor::setMockValue(s, v);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
class MockEtb : public IEtbController {
|
||||
public:
|
||||
// IEtbController mocks
|
||||
MOCK_METHOD(void, reset, (), ());
|
||||
MOCK_METHOD(void, reset, (), (override));
|
||||
MOCK_METHOD(void, update, (), (override));
|
||||
MOCK_METHOD(bool, init, (etb_function_e function, DcMotor* motor, pid_s* pidParameters, const ValueProvider3D* pedalMap, bool initializeThrottles), (override));
|
||||
MOCK_METHOD(void, setIdlePosition, (percent_t pos), (override));
|
||||
|
|
Loading…
Reference in New Issue