Skip to content

fixes clang 21.1.8 warnings#2

Open
LowLevelMahn wants to merge 1 commit into
dstien:mainfrom
LowLevelMahn:llm/fix_clang_warnings
Open

fixes clang 21.1.8 warnings#2
LowLevelMahn wants to merge 1 commit into
dstien:mainfrom
LowLevelMahn:llm/fix_clang_warnings

Conversation

@LowLevelMahn
Copy link
Copy Markdown
Contributor

@LowLevelMahn LowLevelMahn commented Mar 29, 2026

src/shape/types.h:16:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
   16 | typedef struct {
      |               ^
      |                VertexF
src/shape/types.h:21:3: note: type is not C-compatible due to this member declaration
   21 |   inline QVector3D toQ() const { return QVector3D(x, y, z); }

src/shape/shapeview.cpp:214:12: warning: unused variable 'color' [-Wunused-variable]
  214 |     QColor color;    

src/app/settings.cpp:233:7: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
  233 |   if (colors.empty() | patterns.empty()) {

additional not-fixed warnings:

your moveRows(QItemSelectionModel* selectionModel, int direction) overloads a virtual from the QAbstractItemModel
in

src/app/resourcesmodel.h
src/shape/shapemodel.h

creates a warnings

src/shape/shapemodel.h:54:21: warning: 'ShapeModel::moveRows' hides overloaded virtual function [-Woverloaded-virtual]
   54 |   void              moveRows(QItemSelectionModel* selectionModel, int direction);
      |                     ^
/usr/include/qt5/QtCore/qabstractitemmodel.h:223:18: note: hidden overloaded virtual function 'QAbstractItemModel::moveRows' declared here: different number of parameters (5 vs 2)
  223 |     virtual bool moveRows(const QModelIndex &sourceParent, int sourceRow, int count,

and many gnu-zero-variadic-macro-arguments warnings like this one

src/app/stunpack.h:34:64: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
   34 | #define STPK_VERBOSE1(msg, ...)  if (verbose > 1)  printf(msg, ## __VA_ARGS__)

but your stunpack lib seems to be better and should be used here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant