[rhythmbox/wip/hadess/cleanups: 32/49] mtpdevice: Fix compile-time warning




commit ad539b8e406171712b0d7b3c03e543fcbe80ebb8
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Nov 3 11:20:36 2021 +0100

    mtpdevice: Fix compile-time warning
    
    rhythmbox/plugins/mtpdevice/rb-mtp-source.c: In function ‘impl_track_upload’:
    rhythmbox/plugins/mtpdevice/rb-mtp-source.c:1255:24: warning: assignment to ‘RBMtpSource *’ from 
incompatible pointer type ‘RBTransferTarget *’ {aka ‘struct _RBTransferTarget *’} 
[-Wincompatible-pointer-types]
     1255 |         upload->source = g_object_ref (target);
          |                        ^

 plugins/mtpdevice/rb-mtp-source.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/plugins/mtpdevice/rb-mtp-source.c b/plugins/mtpdevice/rb-mtp-source.c
index 86eef2650..228bef963 100644
--- a/plugins/mtpdevice/rb-mtp-source.c
+++ b/plugins/mtpdevice/rb-mtp-source.c
@@ -1252,7 +1252,7 @@ impl_track_upload (RBTransferTarget *target,
 
        g_mutex_lock (&upload->lock);
        upload->track = track;
-       upload->source = g_object_ref (target);
+       upload->source = RB_MTP_SOURCE (g_object_ref (target));
 
        destfile = g_file_new_for_uri (dest);
        upload->tempfile = g_file_get_path (destfile);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]