Prechádzať zdrojové kódy

project: fix warnings

osy 4 rokov pred
rodič
commit
0b6b257d67

+ 5 - 2
CocoaSpice/CSDisplayMetal.m

@@ -23,6 +23,9 @@
 #import <spice-client.h>
 #import <spice/protocol.h>
 
+#ifdef DISPLAY_DEBUG
+#undef DISPLAY_DEBUG
+#endif
 #define DISPLAY_DEBUG(display, fmt, ...) \
     SPICE_DEBUG("%d:%d " fmt, \
                 (int)display.channelID, \
@@ -112,8 +115,8 @@ static void cs_mark(SpiceChannel *channel, gint mark, gpointer data) {
 }
 
 static gboolean cs_set_overlay(SpiceChannel *channel, void* pipeline_ptr, gpointer data) {
-    CSDisplayMetal *self = (__bridge CSDisplayMetal *)data;
-#warning Unimplemented
+    //FIXME: implement overlay
+    //CSDisplayMetal *self = (__bridge CSDisplayMetal *)data;
     return false;
 }
 

+ 1 - 1
CocoaSpice/CSSession.m

@@ -224,7 +224,7 @@ static gboolean cs_clipboard_request(SpiceMainChannel *main, guint selection,
 static void cs_clipboard_release(SpiceMainChannel *main, guint selection,
                                  gpointer user_data)
 {
-    CSSession *self = (__bridge CSSession *)user_data;
+    //CSSession *self = (__bridge CSSession *)user_data;
     [[UTMPasteboard generalPasteboard] clearContents];
 }
 

+ 1 - 1
Managers/UTMQemuSystem.m

@@ -110,7 +110,7 @@ static size_t sysctl_read(const char *name) {
 }
 
 - (CPUCount)emulatedCpuCount {
-    static const CPUCount singleCpu = {
+    static const __unused CPUCount singleCpu = {
         .cpus = 1,
         .threads = 1,
     };

+ 0 - 11
Platform/iOS/Legacy/VMConfigSharingViewController.m

@@ -39,17 +39,6 @@
     }
 }
 
-- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-    UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
-    /* // TODO: re-enable directory picker
-    if (cell == self.selectDirectoryCell) {
-        [self selectDirectory];
-        [tableView deselectRowAtIndexPath:indexPath animated:YES];
-    }
-     */
-    [super tableView:tableView didSelectRowAtIndexPath:indexPath];
-}
-
 - (void)showShareDirectoryOptions:(BOOL)visible animated:(BOOL)animated {
     [self cells:self.directorySharingCells setHidden:!visible];
     if (self.configuration.shareDirectoryName.length == 0) {

+ 1 - 4
Platform/iOS/Legacy/VMListViewController.m

@@ -338,15 +338,12 @@
     }
 }
 
-/*
 - (BOOL)collectionView:(UICollectionView *)collectionView canHandleDropSession:(id<UIDropSession>)session {
-    // TODO: implement this
+    return NO;
 }
 
 - (void)collectionView:(nonnull UICollectionView *)collectionView performDropWithCoordinator:(nonnull id<UICollectionViewDropCoordinator>)coordinator {
-    // TODO: implement this
 }
-*/
 
 #pragma mark - Work status indicator
 

+ 2 - 2
UTM.xcodeproj/project.pbxproj

@@ -4254,7 +4254,7 @@
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
 				CLANG_WARN_EMPTY_BODY = YES;
 				CLANG_WARN_ENUM_CONVERSION = YES;
 				CLANG_WARN_INFINITE_RECURSION = YES;
@@ -4331,7 +4331,7 @@
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
 				CLANG_WARN_EMPTY_BODY = YES;
 				CLANG_WARN_ENUM_CONVERSION = YES;
 				CLANG_WARN_INFINITE_RECURSION = YES;

+ 12 - 12
gstreamer/gst_ios_init.m

@@ -489,21 +489,21 @@ gst_ios_init (void)
     const gchar *docs_dir = [docs UTF8String];
     gchar *ca_certificates;
     
-    g_setenv ("TMP", tmp_dir, TRUE);
-    g_setenv ("TEMP", tmp_dir, TRUE);
-    g_setenv ("TMPDIR", tmp_dir, TRUE);
-    g_setenv ("XDG_RUNTIME_DIR", resources_dir, TRUE);
-    g_setenv ("XDG_CACHE_HOME", cache_dir, TRUE);
+    g_setenv ("TMP", tmp_dir, true);
+    g_setenv ("TEMP", tmp_dir, true);
+    g_setenv ("TMPDIR", tmp_dir, true);
+    g_setenv ("XDG_RUNTIME_DIR", resources_dir, true);
+    g_setenv ("XDG_CACHE_HOME", cache_dir, true);
     
-    g_setenv ("HOME", docs_dir, TRUE);
-    g_setenv ("XDG_DATA_DIRS", resources_dir, TRUE);
-    g_setenv ("XDG_CONFIG_DIRS", resources_dir, TRUE);
-    g_setenv ("XDG_CONFIG_HOME", cache_dir, TRUE);
-    g_setenv ("XDG_DATA_HOME", resources_dir, TRUE);
-    g_setenv ("FONTCONFIG_PATH", resources_dir, TRUE);
+    g_setenv ("HOME", docs_dir, true);
+    g_setenv ("XDG_DATA_DIRS", resources_dir, true);
+    g_setenv ("XDG_CONFIG_DIRS", resources_dir, true);
+    g_setenv ("XDG_CONFIG_HOME", cache_dir, true);
+    g_setenv ("XDG_DATA_HOME", resources_dir, true);
+    g_setenv ("FONTCONFIG_PATH", resources_dir, true);
     
     ca_certificates = g_build_filename (resources_dir, "ssl", "certs", "ca-certifcates.crt", NULL);
-    g_setenv ("CA_CERTIFICATES", ca_certificates, TRUE);
+    g_setenv ("CA_CERTIFICATES", ca_certificates, true);
     g_free (ca_certificates);
     
     gst_init (NULL, NULL);

+ 3 - 3
qapi/qapi-visit-core.c

@@ -224,7 +224,7 @@ bool visit_type_uint32(Visitor *v, const char *name, uint32_t *obj,
     trace_visit_type_uint32(v, name, obj);
     value = *obj;
     ok = visit_type_uintN(v, &value, name, UINT32_MAX, "uint32_t", errp);
-    *obj = value;
+    *obj = (uint32_t)value;
     return ok;
 }
 
@@ -293,7 +293,7 @@ bool visit_type_int32(Visitor *v, const char *name, int32_t *obj,
     value = *obj;
     ok = visit_type_intN(v, &value, name, INT32_MIN, INT32_MAX, "int32_t",
                         errp);
-    *obj = value;
+    *obj = (int32_t)value;
     return ok;
 }
 
@@ -397,7 +397,7 @@ static bool input_type_enum(Visitor *v, const char *name, int *obj,
     }
 
     g_free(enum_str);
-    *obj = value;
+    *obj = (int)value;
     return true;
 }