From e8ab0a107426fc442c1aceec3d68740d6d2a576f Mon Sep 17 00:00:00 2001 From: smathis Date: Fri, 14 Feb 2025 16:52:26 +0100 Subject: [PATCH] Make the linter happy :-) --- src/masterMacsAxis.cpp | 15 ++++----------- src/masterMacsController.cpp | 8 ++------ 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/masterMacsAxis.cpp b/src/masterMacsAxis.cpp index c32bed8..25c74be 100644 --- a/src/masterMacsAxis.cpp +++ b/src/masterMacsAxis.cpp @@ -47,10 +47,8 @@ masterMacsAxis::masterMacsAxis(masterMacsController *pC, int axisNo) pC->pAxes_[axisNo] = this; Therefore, the axes are managed by the controller pC. If axisNo is out of - bounds, asynMotorAxis prints an error (see - https://github.com/epics-modules/motor/blob/master/motorApp/MotorSrc/asynMotorAxis.cpp, - line 40). However, we want the IOC creation to stop completely, since this - is a configuration error. + bounds, asynMotorAxis prints an error. However, we want the IOC creation to + stop completely, since this is a configuration error. */ if (axisNo >= pC->numAxes_) { asynPrint(pC_->pasynUserSelf, ASYN_TRACE_ERROR, @@ -1179,7 +1177,6 @@ asynStatus masterMacsCreateAxis(const char *portName, int axis) { with the specified name exists) or a nullptr. Therefore, we first do a nullptr check, then a cast to asynPortDriver and lastly a (typesafe) dynamic_upcast to Controller - https://stackoverflow.com/questions/70906749/is-there-a-safe-way-to-cast-void-to-class-pointer-in-c */ void *ptr = findAsynPortDriver(portName); if (ptr == nullptr) { @@ -1213,12 +1210,8 @@ asynStatus masterMacsCreateAxis(const char *portName, int axis) { /* We create a new instance of the axis, using the "new" keyword to - allocate it on the heap while avoiding RAII. - https://github.com/epics-modules/motor/blob/master/motorApp/MotorSrc/asynMotorController.cpp - https://github.com/epics-modules/asyn/blob/master/asyn/asynPortDriver/asynPortDriver.cpp - - The created object is registered in EPICS in its constructor and can - safely be "leaked" here. + allocate it on the heap while avoiding RAII. The created object is + registered in EPICS in its constructor and can safely be "leaked" here. */ #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable" diff --git a/src/masterMacsController.cpp b/src/masterMacsController.cpp index 0b88ca4..057ba46 100644 --- a/src/masterMacsController.cpp +++ b/src/masterMacsController.cpp @@ -505,12 +505,8 @@ asynStatus masterMacsCreateController(const char *portName, double comTimeout) { /* We create a new instance of the controller, using the "new" keyword to - allocate it on the heap while avoiding RAII. - https://github.com/epics-modules/motor/blob/master/motorApp/MotorSrc/asynMotorController.cpp - https://github.com/epics-modules/asyn/blob/master/asyn/asynPortDriver/asynPortDriver.cpp - - The created object is registered in EPICS in its constructor and can - safely be "leaked" here. + allocate it on the heap while avoiding RAII. The created object is + registered in EPICS in its constructor and can safely be "leaked" here. */ #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-variable"