Skip to content

Commit

Permalink
Merge pull request #3266 from BsAtHome/fix_ignored-qualifiers
Browse files Browse the repository at this point in the history
Fix ignored qualifiers
  • Loading branch information
andypugh authored Jan 11, 2025
2 parents a6ec289 + 2bf8e11 commit a9ec62b
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/emc/motion/axis.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ void axis_apply_ext_offsets_to_carte_pos(int extfactor, double *pcmd_p[])
}
}

hal_bit_t axis_plan_external_offsets(double servo_period, bool motion_enable_flag, bool all_homed)
bool axis_plan_external_offsets(double servo_period, bool motion_enable_flag, bool all_homed)
{
static int first_pass = 1;
int n;
Expand Down
2 changes: 1 addition & 1 deletion src/emc/motion/axis.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ void axis_initialize_external_offsets(void);
int axis_init_hal_io(int mot_comp_id);

void axis_handle_jogwheels(bool motion_teleop_flag, bool motion_enable_flag, bool homing_is_active);
hal_bit_t axis_plan_external_offsets(double servo_period, bool motion_enable_flag, bool all_homed);
bool axis_plan_external_offsets(double servo_period, bool motion_enable_flag, bool all_homed);
void axis_check_constraints(double pos[], int failing_axes[]);

void axis_jog_cont(int axis_num, double vel, long servo_period);
Expand Down
2 changes: 1 addition & 1 deletion src/emc/nml_intf/canon_position.cc
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ const CANON_POSITION CANON_POSITION::operator-(const EmcPose &o) const {
return result;
}

const double CANON_POSITION::max() const{
double CANON_POSITION::max() const{
double res = x;
res = fmax(res, this->y);
res = fmax(res, this->z);
Expand Down
2 changes: 1 addition & 1 deletion src/emc/nml_intf/canon_position.hh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct CANON_POSITION {

const CANON_POSITION abs() const;
const CANON_POSITION absdiff(const CANON_POSITION &o) const;
const double max() const;
double max() const;

const EmcPose toEmcPose() const;

Expand Down
8 changes: 4 additions & 4 deletions src/hal/halmodule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ bool from_python(PyObject *o, hal_u32_t *u) {

l = PyLong_AsLongLong(tmp);
if(PyErr_Occurred()) goto fail;
if(l < 0 || l != (hal_u32_t)l) {
if(l < 0 || l != (rtapi_u32)l) {
PyErr_Format(PyExc_OverflowError, "Value %lld out of range", l);
goto fail;
}
Expand All @@ -108,7 +108,7 @@ bool from_python(PyObject *o, hal_s32_t *i) {

l = PyLong_AsLongLong(tmp);
if(PyErr_Occurred()) goto fail;
if(l != (hal_s32_t)l) {
if(l != (rtapi_s32)l) {
PyErr_Format(PyExc_OverflowError, "Value %lld out of range", l);
goto fail;
}
Expand All @@ -129,7 +129,7 @@ bool from_python(PyObject *o, hal_u64_t *u) {

l = PyLong_AsLongLong(tmp);
if(PyErr_Occurred()) goto fail;
if(l < 0 || l != (hal_u64_t)l) {
if(l < 0 || l != (rtapi_u64)l) {
PyErr_Format(PyExc_OverflowError, "Value %lld out of range", l);
goto fail;
}
Expand All @@ -150,7 +150,7 @@ bool from_python(PyObject *o, hal_s64_t *i) {

l = PyLong_AsLongLong(tmp);
if(PyErr_Occurred()) goto fail;
if(l != (hal_s64_t)l) {
if(l != (rtapi_s64)l) {
PyErr_Format(PyExc_OverflowError, "Value %lld out of range", l);
goto fail;
}
Expand Down
2 changes: 1 addition & 1 deletion src/hal/user_comps/xhc-whb04b-6/usb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ uint16_t Usb::getUsbProductId() const
return usbProductId;
}
// ----------------------------------------------------------------------
const bool Usb::isDeviceOpen() const
bool Usb::isDeviceOpen() const
{
return deviceHandle != nullptr;
}
Expand Down
2 changes: 1 addition & 1 deletion src/hal/user_comps/xhc-whb04b-6/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ class Usb : public UsbRawInputListener
~Usb();
uint16_t getUsbVendorId() const;
uint16_t getUsbProductId() const;
const bool isDeviceOpen() const;
bool isDeviceOpen() const;
libusb_context** getContextReference();
libusb_context* getContext();
void setContext(libusb_context* context);
Expand Down
4 changes: 2 additions & 2 deletions src/libnml/inifile/inifile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -601,14 +601,14 @@ iniFind(FILE *fp, const char *tag, const char *section)
return(f.Find(tag, section).value_or(nullptr));
}

extern "C" const int
extern "C" int
iniFindInt(FILE *fp, const char *tag, const char *section, int *result)
{
IniFile f(false, fp);
return(f.Find(result, tag, section));
}

extern "C" const int
extern "C" int
iniFindDouble(FILE *fp, const char *tag, const char *section, double *result)
{
IniFile f(false, fp);
Expand Down
4 changes: 2 additions & 2 deletions src/libnml/inifile/inifile.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ extern "C"
#endif

extern const char *iniFind(FILE *fp, const char *tag, const char *section);
extern const int iniFindInt(FILE *fp, const char *tag, const char *section, int *result);
extern const int iniFindDouble(FILE *fp, const char *tag, const char *section, double *result);
extern int iniFindInt(FILE *fp, const char *tag, const char *section, int *result);
extern int iniFindDouble(FILE *fp, const char *tag, const char *section, double *result);
extern int TildeExpansion(const char *file, char *path, size_t size);

#ifdef __cplusplus
Expand Down

0 comments on commit a9ec62b

Please sign in to comment.