[vlc-commits] [Git][videolan/vlc][master] 8 commits: qt/mainctx: remove unneeded 'this'-capture

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Aug 12 04:44:24 UTC 2022



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
3c2431fc by Johannes Kauffmann at 2022-08-12T04:26:56+00:00
qt/mainctx: remove unneeded 'this'-capture

/home/videolan/vlc/extras/package/win32/../../../modules/gui/qt/maininterface/mainctx.cpp:187:42: warning: lambda capture 'this' is not used [-Wunused-lambda-capture]
        QMetaObject::invokeMethod(this, [this](){
                                         ^~~~

- - - - -
65e2f433 by Johannes Kauffmann at 2022-08-12T04:26:56+00:00
qt/CompositorDComp: use format string for msg_Err

/home/videolan/vlc/extras/package/win32/../../../modules/gui/qt/maininterface/compositor_dcomp_acrylicsurface.cpp:203:21: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
    msg_Err(m_intf, err.what());
                    ^~~~~~~~~~
/home/videolan/vlc/extras/package/win32/../../../include/vlc_messages.h:102:38: note: expanded from macro 'msg_Err'
    msg_Generic(p_this, VLC_MSG_ERR, __VA_ARGS__)
                                     ^~~~~~~~~~~
/home/videolan/vlc/extras/package/win32/../../../include/vlc_messages.h:98:30: note: expanded from macro 'msg_Generic'
                   __func__, __VA_ARGS__)
                             ^~~~~~~~~~~

- - - - -
8bf6f811 by Johannes Kauffmann at 2022-08-12T04:26:56+00:00
qt: maininterface: unname unused parameters

- - - - -
78ee7089 by Johannes Kauffmann at 2022-08-12T04:26:56+00:00
qt: thumbnailcollector: use int64_t specifier

While clang suggests to use %lld ...:

/home/videolan/vlc/extras/package/win32/../../../modules/gui/qt/medialibrary/thumbnailcollector.cpp:80:71: warning: format specifies type 'long' but the argument has type 'long long' [-Wformat]
            qDebug("thumbnail generation failed, id: %ld, url: '%s'", id, qUtf8Printable(url));
                                                     ~~~              ^~
                                                     %lld

... 'id' is int64_t, so we use PRId64 instead of lld.

- - - - -
0896ab95 by Johannes Kauffmann at 2022-08-12T04:26:56+00:00
qt: video_effects: fix widget name

/home/videolan/vlc/extras/package/win32/../../../modules/gui/qt/dialogs/extended/video_effects.ui: Warning: Tab-stop assignment: 'gradientTypeCheck' is not a valid widget.

Probably leftover from 2b3ad74b12eb4140e4bb01dc18ee96848d0d883f.

- - - - -
67bcd481 by Johannes Kauffmann at 2022-08-12T04:26:56+00:00
cli: fix unused parameter warning on Windows

/home/videolan/vlc/extras/package/win32/../../../modules/control/cli/cli.c:212:38: warning: unused parameter 'cl' [-Wunused-parameter]
static int LogOut(struct cli_client *cl, const char *const *args, size_t count,
                                     ^

- - - - -
b0b14cfc by Johannes Kauffmann at 2022-08-12T04:26:56+00:00
puzzle: use fabsf instead of abs

/home/videolan/vlc/extras/package/win32/../../../modules/video_filter/puzzle/puzzle_bezier.c:85:22: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]
                if ( abs ( f_bez_y ) > ( f_bez_x * ( 0.9 * ((float)i_lines) / ((float)i_width) ) ) )
                     ^
/home/videolan/vlc/extras/package/win32/../../../modules/video_filter/puzzle/puzzle_bezier.c:85:22: note: use function 'fabsf' instead
                if ( abs ( f_bez_y ) > ( f_bez_x * ( 0.9 * ((float)i_lines) / ((float)i_width) ) ) )
                     ^~~
                     fabsf

- - - - -
405346f2 by Johannes Kauffmann at 2022-08-12T04:26:56+00:00
transcode: remove unused variable

- - - - -


8 changed files:

- modules/control/cli/cli.c
- modules/gui/qt/dialogs/extended/video_effects.ui
- modules/gui/qt/maininterface/compositor_dcomp_acrylicsurface.cpp
- modules/gui/qt/maininterface/mainctx.cpp
- modules/gui/qt/maininterface/mainctx_win32.cpp
- modules/gui/qt/medialibrary/thumbnailcollector.cpp
- modules/stream_out/transcode/transcode.c
- modules/video_filter/puzzle/puzzle_bezier.c


Changes:

=====================================
modules/control/cli/cli.c
=====================================
@@ -240,6 +240,7 @@ static int LogOut(struct cli_client *cl, const char *const *args, size_t count,
         net_Close(sys->i_socket);
         sys->i_socket = -1;
     }
+    (void) cl;
 #endif
     (void) args; (void) count;
     return 0;


=====================================
modules/gui/qt/dialogs/extended/video_effects.ui
=====================================
@@ -1698,7 +1698,7 @@
   <tabstop>posterizeEnable</tabstop>
   <tabstop>gradientEnable</tabstop>
   <tabstop>gradientModeCombo</tabstop>
-  <tabstop>gradientTypeCheck</tabstop>
+  <tabstop>gradientColorCheck</tabstop>
   <tabstop>gradientCartoonCheck</tabstop>
   <tabstop>sepiaEnable</tabstop>
   <tabstop>sepiaIntensitySpin</tabstop>


=====================================
modules/gui/qt/maininterface/compositor_dcomp_acrylicsurface.cpp
=====================================
@@ -104,7 +104,7 @@ CompositorDCompositionAcrylicSurface::~CompositorDCompositionAcrylicSurface()
         DestroyWindow(m_dummyWindow);
 }
 
-bool CompositorDCompositionAcrylicSurface::nativeEventFilter(const QByteArray &eventType, void *message, long *result)
+bool CompositorDCompositionAcrylicSurface::nativeEventFilter(const QByteArray &, void *message, long *)
 {
     MSG* msg = static_cast<MSG*>( message );
 
@@ -200,7 +200,7 @@ try
 }
 catch (std::exception &err)
 {
-    msg_Err(m_intf, err.what());
+    msg_Err(m_intf, "%s", err.what());
     return false;
 }
 


=====================================
modules/gui/qt/maininterface/mainctx.cpp
=====================================
@@ -184,7 +184,7 @@ MainCtx::MainCtx(qt_intf_t *_p_intf)
     if( config_GetInt("qt-privacy-ask") )
     {
         //postpone dialog call, as composition might not be ready yet
-        QMetaObject::invokeMethod(this, [this](){
+        QMetaObject::invokeMethod(this, [](){
             THEDP->firstRunDialog();
         }, Qt::QueuedConnection);
     }


=====================================
modules/gui/qt/maininterface/mainctx_win32.cpp
=====================================
@@ -614,7 +614,7 @@ bool InterfaceWindowHandlerWin32::eventFilter(QObject* obj, QEvent* ev)
     return ret;
 }
 
-bool InterfaceWindowHandlerWin32::nativeEventFilter(const QByteArray &eventType, void *message, long *result)
+bool InterfaceWindowHandlerWin32::nativeEventFilter(const QByteArray &, void *message, long *result)
 {
     MSG* msg = static_cast<MSG*>( message );
 


=====================================
modules/gui/qt/medialibrary/thumbnailcollector.cpp
=====================================
@@ -77,7 +77,7 @@ void ThumbnailCollector::onVlcMLEvent(void *data, const vlc_ml_event_t *event)
         if (event->media_thumbnail_generated.b_success && !url.isEmpty()) {
             self->m_thumbnails.insert(id, url);
         } else {
-            qDebug("thumbnail generation failed, id: %ld, url: '%s'", id, qUtf8Printable(url));
+            qDebug("thumbnail generation failed, id: %" PRId64 ", url: '%s'", id, qUtf8Printable(url));
         }
     }
 


=====================================
modules/stream_out/transcode/transcode.c
=====================================
@@ -741,7 +741,6 @@ static int Send( sout_stream_t *p_stream, void *_id, block_t *p_buffer )
             goto error;
     }
 
-    sout_stream_sys_t *sys = p_stream->p_sys;
     if( p_buffer != NULL )
     {
         assert( p_buffer->p_next == NULL );


=====================================
modules/video_filter/puzzle/puzzle_bezier.c
=====================================
@@ -82,11 +82,11 @@ point_t *puzzle_scale_curve_H(int32_t i_width, int32_t i_lines, uint8_t i_pts_nb
             f_bez_y = bezier_val(ps_new_pt,f_sub_t,i_main_t,y);
 
             if ( f_bez_x < ((float) i_width) / 2 ) {
-                if ( abs ( f_bez_y ) > ( f_bez_x * ( 0.9 * ((float)i_lines) / ((float)i_width) ) ) )
+                if ( fabsf ( f_bez_y ) > ( f_bez_x * ( 0.9 * ((float)i_lines) / ((float)i_width) ) ) )
                     b_fit = false;
             }
             else  {
-                if ( abs ( f_bez_y ) > ( ( ((float)i_width) - f_bez_x ) * ( 0.9 * ((float)i_lines) / ((float)i_width) ) ) )
+                if ( fabsf ( f_bez_y ) > ( ( ((float)i_width) - f_bez_x ) * ( 0.9 * ((float)i_lines) / ((float)i_width) ) ) )
                     b_fit = false;
             }
         }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/008e8cefd210847b0fc12be18869ecef9d3c0cb3...405346f2d8fa4e9bb4d3a8e4b8b0278f9092a6b9

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/008e8cefd210847b0fc12be18869ecef9d3c0cb3...405346f2d8fa4e9bb4d3a8e4b8b0278f9092a6b9
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list