Skip to content

Instantly share code, notes, and snippets.

View lucasdemarchi's full-sized avatar

Lucas De Marchi lucasdemarchi

View GitHub Profile
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
/*
* Copyright (C) 2015 Intel Corporation. All rights reserved.
*
* This file is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This file is distributed in the hope that it will be useful, but
diff --git a/Tools/Replay/Replay.cpp b/Tools/Replay/Replay.cpp
index 778e53b..f5564a1 100644
--- a/Tools/Replay/Replay.cpp
+++ b/Tools/Replay/Replay.cpp
@@ -1019,7 +1019,8 @@ void Replay::loop()
if (check_solution) {
report_checks();
}
- exit(0);
+
# To display the perf.data header info, please use --header/--header-only options.
#
#
# Total Lost Samples: 0
#
# Samples: 1K of event 'cycles:ppp'
# Event count (approx.): 86371140
#
# Overhead Command Shared Object Symbol
# ........ ........ ................. ..............................................
diff --git a/libraries/AP_Compass/CompassCalibrator.cpp b/libraries/AP_Compass/CompassCalibrator.cpp
index 2135ab2..0f7039c 100644
--- a/libraries/AP_Compass/CompassCalibrator.cpp
+++ b/libraries/AP_Compass/CompassCalibrator.cpp
@@ -504,13 +504,10 @@ void CompassCalibrator::run_sphere_fit()
param_t fit1_params, fit2_params;
fit1_params = fit2_params = _params;
- float JTJ[COMPASS_CAL_NUM_SPHERE_PARAMS*COMPASS_CAL_NUM_SPHERE_PARAMS];
- float JTJ2[COMPASS_CAL_NUM_SPHERE_PARAMS*COMPASS_CAL_NUM_SPHERE_PARAMS];
-- nuttx-px4fmu-v4-default
-- CMAKE_INSTALL_PREFIX:
-- cmake module path: /home/lucas/p/dronecode/PX4/Firmware/cmake
-- Nuttx build for px4fmu-v4 on m4 hardware, using nsh with ROMFS on px4fmu_common
CMake Deprecation Warning at /usr/share/cmake/Modules/CMakeForceCompiler.cmake:79 (message):
The CMAKE_FORCE_C_COMPILER macro is deprecated. Instead just set
CMAKE_C_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
cmake/toolchains/Toolchain-arm-none-eabi.cmake:31 (cmake_force_c_compiler)
/usr/share/cmake/Modules/CMakeDetermineSystem.cmake:98 (include)
-- nuttx-px4fmu-v4-default
-- CMAKE_INSTALL_PREFIX:
-- cmake module path: /x/p/dronecode/PX4/Firmware/cmake
-- Nuttx build for px4fmu-v4 on m4 hardware, using nsh with ROMFS on px4fmu_common
CMake Deprecation Warning at /usr/share/cmake/Modules/CMakeForceCompiler.cmake:79 (message):
The CMAKE_FORCE_C_COMPILER macro is deprecated. Instead just set
CMAKE_C_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
cmake/toolchains/Toolchain-arm-none-eabi.cmake:31 (cmake_force_c_compiler)
/usr/share/cmake/Modules/CMakeDetermineSystem.cmake:98 (include)
diff --git a/libraries/AP_Param/AP_Param.cpp b/libraries/AP_Param/AP_Param.cpp
index 5b663ab..f51b98b 100644
--- a/libraries/AP_Param/AP_Param.cpp
+++ b/libraries/AP_Param/AP_Param.cpp
@@ -1802,17 +1802,26 @@ bool AP_Param::load_defaults_file(const char *filename, bool panic_on_error)
AP_HAL::panic("AP_Param: Failed to allocate mutable string");
}
+ char *pname = mutable_filename;
+ for (char *pname = strchrnul(mutable_filename, ',');
diff --git a/libraries/AP_Param/AP_Param.cpp b/libraries/AP_Param/AP_Param.cpp
index 5b663ab..048ad62 100644
--- a/libraries/AP_Param/AP_Param.cpp
+++ b/libraries/AP_Param/AP_Param.cpp
@@ -1802,17 +1802,27 @@ bool AP_Param::load_defaults_file(const char *filename, bool panic_on_error)
AP_HAL::panic("AP_Param: Failed to allocate mutable string");
}
+ char *pname = mutable_filename;
+ for (pname = mutable_filename; *pname != '\0';
diff --git a/shared/hash.c b/shared/hash.c
index ab8534a..18898ac 100644
--- a/shared/hash.c
+++ b/shared/hash.c
@@ -137,8 +137,7 @@ static inline unsigned int hash_superfast(const char *key, unsigned int len)
return hash;
}
-static struct hash_entry *hash_add_entry(struct hash *hash,
- const char *key, const void *value)
diff --git a/shared/hash.c b/shared/hash.c
index ab8534a..7d5860f 100644
--- a/shared/hash.c
+++ b/shared/hash.c
@@ -17,6 +17,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#include <assert.h>
#include <errno.h>