This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: qv4l2: fix QFile::open compiler warnings
Author:  Hans Verkuil <[email protected]>
Date:    Mon May 11 07:50:59 2026 +0200

Check the return value of QFile::open to avoid compiler warnings.

Signed-off-by: Hans Verkuil <[email protected]>

 utils/qv4l2/qv4l2.cpp | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=d86b1b9616236dfb549b2cc9415cf4f0ee06f856
diff --git a/utils/qv4l2/qv4l2.cpp b/utils/qv4l2/qv4l2.cpp
index 4395d6b7f0fd..c688a2a15b48 100644
--- a/utils/qv4l2/qv4l2.cpp
+++ b/utils/qv4l2/qv4l2.cpp
@@ -1670,9 +1670,10 @@ void SaveDialog::selected(const QString &s)
 {
        if (!s.isEmpty()) {
                QFile file(s);
-               file.open(QIODevice::WriteOnly | QIODevice::Truncate);
-               file.write((const char *)m_buf, m_size);
-               file.close();
+               if (file.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
+                       file.write((const char *)m_buf, m_size);
+                       file.close();
+               }
        }
        delete [] m_buf;
 }
@@ -1712,8 +1713,8 @@ void ApplicationWindow::openRawFile(const QString &s)
        if (m_saveRaw.openMode())
                m_saveRaw.close();
        m_saveRaw.setFileName(s);
-       m_saveRaw.open(QIODevice::WriteOnly | QIODevice::Truncate);
-       m_saveRawAct->setChecked(true);
+       if (m_saveRaw.open(QIODevice::WriteOnly | QIODevice::Truncate))
+               m_saveRawAct->setChecked(true);
 }
 
 void ApplicationWindow::saveRaw(bool checked)
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to