Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion scripts/cppcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@ fi
# See if cppcheck accepts --check-level
EXHAUSTIVE=$(cppcheck --check-level=exhaustive --version > /dev/null 2>&1 && echo "--check-level=exhaustive")

CPPCHKOPT=( -j "$nproc" --force "$EXHAUSTIVE" )
CPPCHKOPT=( -j "$nproc" --force "$EXHAUSTIVE" --inline-suppr )
CPPCHKOPT+=( "--enable=warning,performance,portability" )
CPPCHKOPT+=( "-I$(realpath "$(dirname "$0")/../include")" )

if [ -n "$CPPCHECK_OPTS" ]; then
read -r -a OPTS <<< "$CPPCHECK_OPTS"
CPPCHKOPT+=( "${OPTS[@]}" )
fi

# Even cppcheck 2.3 (debian 11) supports c++17 (undocumented)
CCSTD=( --std=c11 --language=c )
CXSTD=( --std=c++17 --language=c++ )
Expand Down
2 changes: 1 addition & 1 deletion src/emc/canterp/canterp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static char the_command_args[LINELEN] = { 0 }; // just the args part

class Canterp : public InterpBase {
public:
Canterp () : f(0) {}
Canterp () : f(0), filename{} {}
char *error_text(int errcode, char *buf, size_t buflen) override;
char *stack_name(int index, char *buf, size_t buflen) override;
char *line_text(char *buf, size_t buflen) override;
Expand Down
23 changes: 22 additions & 1 deletion src/emc/nml_intf/canon.hh
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,28 @@ typedef struct {
} CanonSpindle_t;

typedef struct CanonConfig_t {
CanonConfig_t() : rotary_unlock_for_traverse(-1) {}
CanonConfig_t()
: xy_rotation(0.0),
rotary_unlock_for_traverse(-1),
g5xOffset{},
g92Offset{},
endPoint{},
lengthUnits(CANON_UNITS_INCHES),
activePlane(CANON_PLANE::XY),
toolOffset{},
motionMode(CANON_EXACT_STOP),
motionTolerance(0.0),
naivecamTolerance(0.0),
feed_mode(0),
spindle_num(0),
spindle{},
linearFeedRate(0.0),
angularFeedRate(0.0),
optional_program_stop(false),
block_delete(false),
cartesian_move(0),
angular_move(0)
{}

double xy_rotation;
int rotary_unlock_for_traverse; // jointnumber or -1
Expand Down
Loading
Loading