[clazy] [Bug 363428] New: false positive for writing to temporary QTextTableCell::setFormat

via KDE Bugzilla bugzilla_noreply at kde.org
Mon May 23 10:53:44 BST 2016


https://bugs.kde.org/show_bug.cgi?id=363428

            Bug ID: 363428
           Summary: false positive for writing to temporary
                    QTextTableCell::setFormat
           Product: clazy
           Version: unspecified
          Platform: Other
                OS: other
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: unassigned-bugs at kde.org
          Reporter: eric.lemanissier at gmail.com
                CC: smartins at kde.org

Calling setFormat on a temporary QTextTableCell raises "Call to temporary is a
no-op", but it is not, because QTextTableCell is just an indirection to the
underlying QTextTable.

all other QTextTableCell members are const, so they are no-ops if the return
value is ignored

Reproducible: Always

Steps to Reproduce:

    QTextCursor cursor;
    QTextTableCellFormat cellFormat;
// ...
    QTextTable *currentTable = cursor.currentTable();
    currentTable->cellAt(cursor).setFormat(cellFormat);

Actual Results:  
warning: Call to temporary is a no-op: QTextTableCell::setFormat
[-Wclazy-writing-to-temporary]
    currentTable->cellAt(cursor).setFormat(cellFormat);
    ^

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Unassigned-bugs mailing list