xrt: Fix missing function declaration without a prototype warnings

Found by clang-15.

src/xrt/auxiliary/math/m_permutation.c:133:15: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
m_do_the_thing()
              ^
               void
This commit is contained in:
Jakob Bornecrantz 2023-02-02 12:57:19 +00:00
parent 559e145934
commit 0938a1a02b
23 changed files with 29 additions and 29 deletions

View file

@ -130,7 +130,7 @@ printArray(const uint32_t *array, uint32_t num)
}
void
m_do_the_thing()
m_do_the_thing(void)
{
struct m_permutator mp = {0};
uint32_t elements[7];

View file

@ -40,7 +40,7 @@ m_permutator_reset(struct m_permutator *mp);
void
m_do_the_thing();
m_do_the_thing(void);
#ifdef __cplusplus

View file

@ -26,7 +26,7 @@ struct imu_fusion;
* @ingroup aux_tracking
*/
struct imu_fusion *
imu_fusion_create();
imu_fusion_create(void);
/*!

View file

@ -48,7 +48,7 @@ enum u_logging_level
debug_get_log_option(const char *name, enum u_logging_level _default);
#define DEBUG_GET_ONCE_OPTION(suffix, name, _default) \
static const char *debug_get_option_##suffix() \
static const char *debug_get_option_##suffix(void) \
{ \
static bool gotten = false; \
static const char *stored; \
@ -60,7 +60,7 @@ debug_get_log_option(const char *name, enum u_logging_level _default);
}
#define DEBUG_GET_ONCE_TRISTATE_OPTION(suffix, name) \
static enum debug_tristate_option debug_get_tristate_option_##suffix() \
static enum debug_tristate_option debug_get_tristate_option_##suffix(void) \
{ \
static bool gotten = false; \
static enum debug_tristate_option stored; \
@ -72,7 +72,7 @@ debug_get_log_option(const char *name, enum u_logging_level _default);
}
#define DEBUG_GET_ONCE_BOOL_OPTION(suffix, name, _default) \
static bool debug_get_bool_option_##suffix() \
static bool debug_get_bool_option_##suffix(void) \
{ \
static bool gotten = false; \
static bool stored; \
@ -84,7 +84,7 @@ debug_get_log_option(const char *name, enum u_logging_level _default);
}
#define DEBUG_GET_ONCE_NUM_OPTION(suffix, name, _default) \
static long debug_get_num_option_##suffix() \
static long debug_get_num_option_##suffix(void) \
{ \
static long gotten = false; \
static long stored; \
@ -96,7 +96,7 @@ debug_get_log_option(const char *name, enum u_logging_level _default);
}
#define DEBUG_GET_ONCE_FLOAT_OPTION(suffix, name, _default) \
static float debug_get_float_option_##suffix() \
static float debug_get_float_option_##suffix(void) \
{ \
static long gotten = false; \
static float stored; \
@ -108,7 +108,7 @@ debug_get_log_option(const char *name, enum u_logging_level _default);
}
#define DEBUG_GET_ONCE_LOG_OPTION(suffix, name, _default) \
static enum u_logging_level debug_get_log_option_##suffix() \
static enum u_logging_level debug_get_log_option_##suffix(void) \
{ \
static long gotten = false; \
static enum u_logging_level stored; \

View file

@ -21,7 +21,7 @@ extern "C" {
{ \
void *ptr; \
}; \
struct u_deque_##TYPE u_deque_##TYPE##_create(); \
struct u_deque_##TYPE u_deque_##TYPE##_create(void); \
void u_deque_##TYPE##_push_back(struct u_deque_##TYPE ud, TYPE e); \
bool u_deque_##TYPE##_pop_front(struct u_deque_##TYPE ud, TYPE *e); \
TYPE u_deque_##TYPE##_at(struct u_deque_##TYPE ud, size_t i); \

View file

@ -79,7 +79,7 @@ write_version(uint32_t major, uint32_t minor)
*/
void
u_metrics_init()
u_metrics_init(void)
{
const char *str = debug_get_option_metrics_file();
if (str == NULL) {
@ -103,7 +103,7 @@ u_metrics_init()
}
void
u_metrics_close()
u_metrics_close(void)
{
if (!g_metrics_initialized) {
return;

View file

@ -11,7 +11,7 @@
int
u_silence_pedantic_warning()
u_silence_pedantic_warning(void)
{
return 42;
}

View file

@ -49,7 +49,7 @@ struct u_process
};
struct u_process *
u_process_create_if_not_running()
u_process_create_if_not_running(void)
{
#ifdef XRT_HAVE_LIBBSD

View file

@ -27,7 +27,7 @@ struct u_process;
* @ingroup aux_util
*/
struct u_process *
u_process_create_if_not_running();
u_process_create_if_not_running(void);
/*!
* Releases the unique handle of the operating system user.

View file

@ -118,7 +118,7 @@ client_gl_context_end_locked(struct xrt_compositor *xc)
}
}
typedef void (*void_ptr_func)();
typedef void (*void_ptr_func)(void);
#ifdef __cplusplus
extern "C"

View file

@ -97,7 +97,7 @@ ns_to_ms(int64_t ns)
}
static double
ts_ms()
ts_ms(void)
{
int64_t monotonic = os_monotonic_get_ns();
return ns_to_ms(monotonic);

View file

@ -30,7 +30,7 @@ struct os_ble_device;
* @ingroup drv_arduino
*/
struct xrt_auto_prober *
arduino_create_auto_prober();
arduino_create_auto_prober(void);
/*!
* Create a arduino device from a ble notify.

View file

@ -99,7 +99,7 @@ arduino_prober_autoprobe(struct xrt_auto_prober *xap,
*/
struct xrt_auto_prober *
arduino_create_auto_prober()
arduino_create_auto_prober(void)
{
struct arduino_prober *ap = U_TYPED_CALLOC(struct arduino_prober);
ap->base.name = "Arduino";

View file

@ -26,7 +26,7 @@ extern "C" {
* @ingroup drv_daydream
*/
struct xrt_auto_prober *
daydream_create_auto_prober();
daydream_create_auto_prober(void);
/*!

View file

@ -101,7 +101,7 @@ daydream_prober_autoprobe(struct xrt_auto_prober *xap,
*/
struct xrt_auto_prober *
daydream_create_auto_prober()
daydream_create_auto_prober(void)
{
struct daydream_prober *pdaydream = U_TYPED_CALLOC(struct daydream_prober);
pdaydream->base.name = "DayDream";

View file

@ -72,7 +72,7 @@ euroc_prober_autoprobe(struct xrt_auto_prober *xap,
}
struct xrt_auto_prober *
euroc_create_auto_prober()
euroc_create_auto_prober(void)
{
// `ep` var name used for euroc_player, let's use `epr` instead
struct euroc_prober *epr = U_TYPED_CALLOC(struct euroc_prober);

View file

@ -73,7 +73,7 @@ qwerty_prober_autoprobe(struct xrt_auto_prober *xap,
}
struct xrt_auto_prober *
qwerty_create_auto_prober()
qwerty_create_auto_prober(void)
{
struct qwerty_prober *qp = U_TYPED_CALLOC(struct qwerty_prober);
qp->base.name = "Qwerty";

View file

@ -59,7 +59,7 @@ rs_source_create(struct xrt_frame_context *xfctx, int device_idx);
* @return An xrt_device that you can call get_tracked_pose on with XRT_INPUT_GENERIC_TRACKER_POSE
*/
struct xrt_device *
rs_create_tracked_device_internal_slam();
rs_create_tracked_device_internal_slam(void);
/*!
* @dir drivers/realsense

View file

@ -94,7 +94,7 @@ rift_s_tracker_switch_method_cb(void *t_ptr)
}
XRT_MAYBE_UNUSED struct t_imu_calibration
rift_s_create_slam_imu_calib()
rift_s_create_slam_imu_calib(void)
{
/* FIXME: Validate these hard coded standard deviations against
* some actual at-rest IMU measurements */

View file

@ -60,7 +60,7 @@ sample_auto_prober_autoprobe(struct xrt_auto_prober *xap,
}
struct xrt_auto_prober *
sample_create_auto_prober()
sample_create_auto_prober(void)
{
struct sample_auto_prober *sap = U_TYPED_CALLOC(struct sample_auto_prober);
sap->base.name = "Sample";

View file

@ -73,7 +73,7 @@ simulated_prober_autoprobe(struct xrt_auto_prober *xap,
}
struct xrt_auto_prober *
simulated_create_auto_prober()
simulated_create_auto_prober(void)
{
struct simulated_prober *dp = U_TYPED_CALLOC(struct simulated_prober);
dp->base.name = "Simulated";

View file

@ -722,7 +722,7 @@ struct xrt_prober_entry
*
* @ingroup xrt_iface
*/
typedef struct xrt_auto_prober *(*xrt_auto_prober_create_func_t)();
typedef struct xrt_auto_prober *(*xrt_auto_prober_create_func_t)(void);
/*!
* @interface xrt_auto_prober

View file

@ -386,7 +386,7 @@ sdl_instance_init(struct sdl_program *sp);
* @ingroup sdl_test
*/
struct sdl_program *
sdl_program_plus_create();
sdl_program_plus_create(void);
/*!
* Render a frame, called by the compositor when layers have been committed.