]> granicus.if.org Git - nethack/commitdiff
variable set but not used warning in qt_yndlg.cpp
authornhmall <nhmall@nethack.org>
Wed, 3 Feb 2021 17:56:55 +0000 (12:56 -0500)
committernhmall <nhmall@nethack.org>
Wed, 3 Feb 2021 17:56:55 +0000 (12:56 -0500)
../win/Qt/qt_yndlg.cpp: In member function ‘char nethack_qt_::NetHackQtYnDialog::Exec()’:
../win/Qt/qt_yndlg.cpp:80:9: warning: variable ‘ch_per_line’ set but not used [-Wunused-but-set-variable]
   80 |     int ch_per_line=6;
      |         ^~~~~~~~~~~

win/Qt/qt_yndlg.cpp

index 6d19411228c50c576323540f4eae2014d320aa1b..5a7bad1c11cecc69df31c872ebbcd3a6030cd1f4 100644 (file)
@@ -77,7 +77,7 @@ NetHackQtYnDialog::NetHackQtYnDialog(QWidget *parent, const QString &q,
 char NetHackQtYnDialog::Exec()
 {
     QString ch(QString::fromLatin1(choices));
-    int ch_per_line=6;
+//    int ch_per_line=6;
     QString qlabel;
     QString enable;
     if ( qt_compact_mode && !choices ) {
@@ -129,7 +129,7 @@ char NetHackQtYnDialog::Exec()
            ch.append(d[5]);
            ch.append(d[8]);
            ch.append(d[9]);
-           ch_per_line = 3;
+//         ch_per_line = 3;
            def = ' ';
        } else {
            // Hmm... they'll have to use a virtual keyboard