[tracker/wip/carlosg/compiler-warnings: 2512/2517] core: Cast cursor variable to the right type




commit 307b3dd850f96af4e5c14806b4be659dbbc740ca
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Aug 28 11:48:51 2022 +0200

    core: Cast cursor variable to the right type
    
    We are using TrackerSparqlCursor API here, passing a TrackerDBCursor.
    we should cast this subclass to the correct parent type.

 src/libtracker-sparql/core/tracker-data-manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libtracker-sparql/core/tracker-data-manager.c 
b/src/libtracker-sparql/core/tracker-data-manager.c
index 192bcf4a2..4e2728d8d 100644
--- a/src/libtracker-sparql/core/tracker-data-manager.c
+++ b/src/libtracker-sparql/core/tracker-data-manager.c
@@ -746,7 +746,7 @@ ensure_inverse_functional_property (TrackerDataManager  *manager,
        g_free (query);
 
        if (cursor && tracker_db_cursor_iter_next (cursor, NULL, error)) {
-               if (!tracker_sparql_cursor_get_boolean (cursor, 0)) {
+               if (!tracker_sparql_cursor_get_boolean (TRACKER_SPARQL_CURSOR (cursor), 0)) {
                        handle_unsupported_ontology_change (manager,
                                                            NULL, -1, -1,
                                                            property_uri,


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