All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3 0/4] ui/cocoa.m: Fix compiler and runtime warnings on 10.8
@ 2013-04-22 20:29 Peter Maydell
  2013-04-22 20:29 ` [Qemu-devel] [PATCH v3 1/4] ui/cocoa.m: Fix leaks of NSScreen and NSConcreteMapTable Peter Maydell
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Peter Maydell @ 2013-04-22 20:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Andreas Färber, patches

These patches fix various compiler and runtime warnings QEMU provokes
on MacOSX 10.8. The first two fix a leak and some deprecated functions
which cause warnings in the system log when QEMU runs. The second
two avoid some functions which cause compile time warnings about
use of functions deprecated in 10.6.

I believe from my reading of the documentation that these changes
should still work OK on 10.3, but I don't have any way of testing that.

Andreas: I don't write much ObjC so I don't really have a feel for
what is good coding style. I mostly tried to follow the existing
code (eg "//" style comments) and QEMU's C style (eg 80 cols max).
I'm happy to change any of the indentation or whatever to suit your
preferences.

With this patch set the only remaining compile time warnings from clang
on 10.8 are about deprecated methods in audio/coreaudio.c.

Changes v2->v3:
 * rebased again
Changes v1->v2:
 * rebased and fixed up following recent console changes

Peter Maydell (4):
  ui/cocoa.m: Fix leaks of NSScreen and NSConcreteMapTable
  ui/cocoa.m: Avoid deprecated CPS* functions
  ui/cocoa.m: Avoid deprecated NSOpenPanel filename method
  ui/cocoa.m: Avoid deprecated NSOpenPanel beginSheetForDirectory

 ui/cocoa.m | 52 ++++++++++++++++++++++++++++++++--------------------
 1 file changed, 32 insertions(+), 20 deletions(-)

-- 
1.7.11.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PATCH v3 1/4] ui/cocoa.m: Fix leaks of NSScreen and NSConcreteMapTable
  2013-04-22 20:29 [Qemu-devel] [PATCH v3 0/4] ui/cocoa.m: Fix compiler and runtime warnings on 10.8 Peter Maydell
@ 2013-04-22 20:29 ` Peter Maydell
  2013-04-22 20:29 ` [Qemu-devel] [PATCH v3 2/4] ui/cocoa.m: Avoid deprecated CPS* functions Peter Maydell
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Peter Maydell @ 2013-04-22 20:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Andreas Färber, patches

On MacOSX 10.8 QEMU provokes system log messages:
11/03/2013 17:03:29.998 qemu-system-arm[42586]: objc[42586]: Object
0x7ffbf9c2f3b0 of class NSScreen autoreleased with no pool in place - just
leaking - break on objc_autoreleaseNoPool() to debug

11/03/2013 17:03:29.999 qemu-system-arm[42586]: objc[42586]: Object
0x7ffbf9c3a010 of class NSConcreteMapTable autoreleased with no pool in
place - just leaking - break on objc_autoreleaseNoPool() to debug

This is because we call back into Cocoa from threads other than
the UI thread (specifically from the CPU thread). Since we created
these threads via the POSIX API rather than NSThread, they don't have
automatically created autorelease pools. Guard all the functions where
QEMU can call back into the Cocoa UI code with autorelease pools
so that we don't leak any Cocoa objects.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 ui/cocoa.m | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/ui/cocoa.m b/ui/cocoa.m
index d51462a..833c6ed 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -960,6 +960,8 @@ int main (int argc, const char * argv[]) {
 static void cocoa_update(DisplayChangeListener *dcl,
                          int x, int y, int w, int h)
 {
+    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
+
     COCOA_DEBUG("qemu_cocoa: cocoa_update\n");
 
     NSRect rect;
@@ -973,18 +975,24 @@ static void cocoa_update(DisplayChangeListener *dcl,
             h * [cocoaView cdy]);
     }
     [cocoaView setNeedsDisplayInRect:rect];
+
+    [pool release];
 }
 
 static void cocoa_switch(DisplayChangeListener *dcl,
                          DisplaySurface *surface)
 {
-    COCOA_DEBUG("qemu_cocoa: cocoa_resize\n");
+    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
 
+    COCOA_DEBUG("qemu_cocoa: cocoa_switch\n");
     [cocoaView switchSurface:surface];
+    [pool release];
 }
 
 static void cocoa_refresh(DisplayChangeListener *dcl)
 {
+    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
+
     COCOA_DEBUG("qemu_cocoa: cocoa_refresh\n");
 
     if (kbd_mouse_is_absolute()) {
@@ -1007,6 +1015,7 @@ static void cocoa_refresh(DisplayChangeListener *dcl)
         }
     } while(event != nil);
     graphic_hw_update(NULL);
+    [pool release];
 }
 
 static void cocoa_cleanup(void)
-- 
1.7.11.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PATCH v3 2/4] ui/cocoa.m: Avoid deprecated CPS* functions
  2013-04-22 20:29 [Qemu-devel] [PATCH v3 0/4] ui/cocoa.m: Fix compiler and runtime warnings on 10.8 Peter Maydell
  2013-04-22 20:29 ` [Qemu-devel] [PATCH v3 1/4] ui/cocoa.m: Fix leaks of NSScreen and NSConcreteMapTable Peter Maydell
@ 2013-04-22 20:29 ` Peter Maydell
  2013-04-22 20:29 ` [Qemu-devel] [PATCH v3 3/4] ui/cocoa.m: Avoid deprecated NSOpenPanel filename method Peter Maydell
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Peter Maydell @ 2013-04-22 20:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Andreas Färber, patches

The functions CPSGetCurrentProcess and CPSEnableForegroundOperation
are deprecated in newer versions of MacOSX and cause warning messages
to be logged to the system log. Instead, use the new preferred method
of promoting our console process up to a graphical app with menubar
and Dock icon, which is TransformProcessType. (This function came
in with MacOSX 10.3, so there's no need to retain the old method as
we don't support anything earlier than 10.3 anyway.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 ui/cocoa.m | 23 ++++++-----------------
 1 file changed, 6 insertions(+), 17 deletions(-)

diff --git a/ui/cocoa.m b/ui/cocoa.m
index 833c6ed..e3e1204 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -851,22 +851,10 @@ QemuCocoaView *cocoaView;
 
 
 
-// Dock Connection
-typedef struct CPSProcessSerNum
-{
-        UInt32                lo;
-        UInt32                hi;
-} CPSProcessSerNum;
-
-OSErr CPSGetCurrentProcess( CPSProcessSerNum *psn);
-OSErr CPSEnableForegroundOperation( CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5);
-OSErr CPSSetFrontProcess( CPSProcessSerNum *psn);
-
 int main (int argc, const char * argv[]) {
 
     gArgc = argc;
     gArgv = (char **)argv;
-    CPSProcessSerNum PSN;
     int i;
 
     /* In case we don't need to display a window, let's not do that */
@@ -890,12 +878,13 @@ int main (int argc, const char * argv[]) {
     }
 
     NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-    [NSApplication sharedApplication];
 
-    if (!CPSGetCurrentProcess(&PSN))
-        if (!CPSEnableForegroundOperation(&PSN,0x03,0x3C,0x2C,0x1103))
-            if (!CPSSetFrontProcess(&PSN))
-                [NSApplication sharedApplication];
+    // Pull this console process up to being a fully-fledged graphical
+    // app with a menubar and Dock icon
+    ProcessSerialNumber psn = { 0, kCurrentProcess };
+    TransformProcessType(&psn, kProcessTransformToForegroundApplication);
+
+    [NSApplication sharedApplication];
 
     // Add menus
     NSMenu      *menu;
-- 
1.7.11.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PATCH v3 3/4] ui/cocoa.m: Avoid deprecated NSOpenPanel filename method
  2013-04-22 20:29 [Qemu-devel] [PATCH v3 0/4] ui/cocoa.m: Fix compiler and runtime warnings on 10.8 Peter Maydell
  2013-04-22 20:29 ` [Qemu-devel] [PATCH v3 1/4] ui/cocoa.m: Fix leaks of NSScreen and NSConcreteMapTable Peter Maydell
  2013-04-22 20:29 ` [Qemu-devel] [PATCH v3 2/4] ui/cocoa.m: Avoid deprecated CPS* functions Peter Maydell
@ 2013-04-22 20:29 ` Peter Maydell
  2013-04-22 20:29 ` [Qemu-devel] [PATCH v3 4/4] ui/cocoa.m: Avoid deprecated NSOpenPanel beginSheetForDirectory Peter Maydell
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Peter Maydell @ 2013-04-22 20:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Andreas Färber, patches

Avoid the NSOpenPanel filename method (deprecated in MacOSX 10.6)
in favour of using the URL method and extracting the path from the
resulting NSUrl object.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 ui/cocoa.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/cocoa.m b/ui/cocoa.m
index e3e1204..9ff688d 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -810,7 +810,7 @@ QemuCocoaView *cocoaView;
         exit(0);
     } else if(returnCode == NSOKButton) {
         const char *bin = "qemu";
-        char *img = (char*)[ [ sheet filename ] cStringUsingEncoding:NSASCIIStringEncoding];
+        char *img = (char*)[ [ [ sheet URL ] path ] cStringUsingEncoding:NSASCIIStringEncoding];
 
         char **argv = (char**)malloc( sizeof(char*)*3 );
 
-- 
1.7.11.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PATCH v3 4/4] ui/cocoa.m: Avoid deprecated NSOpenPanel beginSheetForDirectory
  2013-04-22 20:29 [Qemu-devel] [PATCH v3 0/4] ui/cocoa.m: Fix compiler and runtime warnings on 10.8 Peter Maydell
                   ` (2 preceding siblings ...)
  2013-04-22 20:29 ` [Qemu-devel] [PATCH v3 3/4] ui/cocoa.m: Avoid deprecated NSOpenPanel filename method Peter Maydell
@ 2013-04-22 20:29 ` Peter Maydell
  2013-05-02 10:29 ` [Qemu-devel] [PATCH v3 0/4] ui/cocoa.m: Fix compiler and runtime warnings on 10.8 Peter Maydell
  2013-05-28 23:42 ` Andreas Färber
  5 siblings, 0 replies; 11+ messages in thread
From: Peter Maydell @ 2013-04-22 20:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Andreas Färber, patches

In MacOSX 10.6 and above the NSOpenPanel beginSheetForDirectory
method is deprecated. Use the preferred replacements instead.
We retain the original code for use on earlier MacOSX versions
because the replacement methods don't exist before 10.6.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 ui/cocoa.m | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/ui/cocoa.m b/ui/cocoa.m
index 9ff688d..cee93be 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -35,6 +35,9 @@
 #ifndef MAC_OS_X_VERSION_10_5
 #define MAC_OS_X_VERSION_10_5 1050
 #endif
+#ifndef MAC_OS_X_VERSION_10_6
+#define MAC_OS_X_VERSION_10_6 1060
+#endif
 
 
 //#define DEBUG
@@ -771,9 +774,20 @@ QemuCocoaView *cocoaView;
         NSOpenPanel *op = [[NSOpenPanel alloc] init];
         [op setPrompt:@"Boot image"];
         [op setMessage:@"Select the disk image you want to boot.\n\nHit the \"Cancel\" button to quit"];
-        [op beginSheetForDirectory:nil file:nil types:[NSArray arrayWithObjects:@"img",@"iso",@"dmg",@"qcow",@"cow",@"cloop",@"vmdk",nil]
+        NSArray *filetypes = [NSArray arrayWithObjects:@"img", @"iso", @"dmg",
+                                 @"qcow", @"cow", @"cloop", @"vmdk", nil];
+#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
+        [op setAllowedFileTypes:filetypes];
+        [op beginSheetModalForWindow:normalWindow
+            completionHandler:^(NSInteger returnCode)
+            { [self openPanelDidEnd:op
+                  returnCode:returnCode contextInfo:NULL ]; } ];
+#else
+        // Compatibility code for pre-10.6, using deprecated method
+        [op beginSheetForDirectory:nil file:nil types:filetypes
               modalForWindow:normalWindow modalDelegate:self
               didEndSelector:@selector(openPanelDidEnd:returnCode:contextInfo:) contextInfo:NULL];
+#endif
     } else {
         // or launch QEMU, with the global args
         [self startEmulationWithArgc:gArgc argv:(char **)gArgv];
-- 
1.7.11.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH v3 0/4] ui/cocoa.m: Fix compiler and runtime warnings on 10.8
  2013-04-22 20:29 [Qemu-devel] [PATCH v3 0/4] ui/cocoa.m: Fix compiler and runtime warnings on 10.8 Peter Maydell
                   ` (3 preceding siblings ...)
  2013-04-22 20:29 ` [Qemu-devel] [PATCH v3 4/4] ui/cocoa.m: Avoid deprecated NSOpenPanel beginSheetForDirectory Peter Maydell
@ 2013-05-02 10:29 ` Peter Maydell
  2013-05-28 15:30   ` Peter Maydell
  2013-05-28 23:42 ` Andreas Färber
  5 siblings, 1 reply; 11+ messages in thread
From: Peter Maydell @ 2013-05-02 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Andreas Färber, patches

Ping!

-- PMM

On 22 April 2013 21:29, Peter Maydell <peter.maydell@linaro.org> wrote:
> These patches fix various compiler and runtime warnings QEMU provokes
> on MacOSX 10.8. The first two fix a leak and some deprecated functions
> which cause warnings in the system log when QEMU runs. The second
> two avoid some functions which cause compile time warnings about
> use of functions deprecated in 10.6.
>
> I believe from my reading of the documentation that these changes
> should still work OK on 10.3, but I don't have any way of testing that.
>
> Andreas: I don't write much ObjC so I don't really have a feel for
> what is good coding style. I mostly tried to follow the existing
> code (eg "//" style comments) and QEMU's C style (eg 80 cols max).
> I'm happy to change any of the indentation or whatever to suit your
> preferences.
>
> With this patch set the only remaining compile time warnings from clang
> on 10.8 are about deprecated methods in audio/coreaudio.c.
>
> Changes v2->v3:
>  * rebased again
> Changes v1->v2:
>  * rebased and fixed up following recent console changes
>
> Peter Maydell (4):
>   ui/cocoa.m: Fix leaks of NSScreen and NSConcreteMapTable
>   ui/cocoa.m: Avoid deprecated CPS* functions
>   ui/cocoa.m: Avoid deprecated NSOpenPanel filename method
>   ui/cocoa.m: Avoid deprecated NSOpenPanel beginSheetForDirectory
>
>  ui/cocoa.m | 52 ++++++++++++++++++++++++++++++++--------------------
>  1 file changed, 32 insertions(+), 20 deletions(-)
>
> --
> 1.7.11.4
>
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH v3 0/4] ui/cocoa.m: Fix compiler and runtime warnings on 10.8
  2013-05-02 10:29 ` [Qemu-devel] [PATCH v3 0/4] ui/cocoa.m: Fix compiler and runtime warnings on 10.8 Peter Maydell
@ 2013-05-28 15:30   ` Peter Maydell
  2013-05-28 17:01     ` Anthony Liguori
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Maydell @ 2013-05-28 15:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Andreas Färber, patches

Ping again! This patchset has now been on the list for eleven
weeks without any review.

thanks
-- PMM

On 2 May 2013 11:29, Peter Maydell <peter.maydell@linaro.org> wrote:
> Ping!
>
> -- PMM
>
> On 22 April 2013 21:29, Peter Maydell <peter.maydell@linaro.org> wrote:
>> These patches fix various compiler and runtime warnings QEMU provokes
>> on MacOSX 10.8. The first two fix a leak and some deprecated functions
>> which cause warnings in the system log when QEMU runs. The second
>> two avoid some functions which cause compile time warnings about
>> use of functions deprecated in 10.6.
>>
>> I believe from my reading of the documentation that these changes
>> should still work OK on 10.3, but I don't have any way of testing that.
>>
>> Andreas: I don't write much ObjC so I don't really have a feel for
>> what is good coding style. I mostly tried to follow the existing
>> code (eg "//" style comments) and QEMU's C style (eg 80 cols max).
>> I'm happy to change any of the indentation or whatever to suit your
>> preferences.
>>
>> With this patch set the only remaining compile time warnings from clang
>> on 10.8 are about deprecated methods in audio/coreaudio.c.
>>
>> Changes v2->v3:
>>  * rebased again
>> Changes v1->v2:
>>  * rebased and fixed up following recent console changes
>>
>> Peter Maydell (4):
>>   ui/cocoa.m: Fix leaks of NSScreen and NSConcreteMapTable
>>   ui/cocoa.m: Avoid deprecated CPS* functions
>>   ui/cocoa.m: Avoid deprecated NSOpenPanel filename method
>>   ui/cocoa.m: Avoid deprecated NSOpenPanel beginSheetForDirectory
>>
>>  ui/cocoa.m | 52 ++++++++++++++++++++++++++++++++--------------------
>>  1 file changed, 32 insertions(+), 20 deletions(-)
>>
>> --
>> 1.7.11.4
>>
>>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH v3 0/4] ui/cocoa.m: Fix compiler and runtime warnings on 10.8
  2013-05-28 15:30   ` Peter Maydell
@ 2013-05-28 17:01     ` Anthony Liguori
  2013-05-28 17:22       ` Andreas Färber
  0 siblings, 1 reply; 11+ messages in thread
From: Anthony Liguori @ 2013-05-28 17:01 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel; +Cc: Andreas Färber, patches

Peter Maydell <peter.maydell@linaro.org> writes:

> Ping again! This patchset has now been on the list for eleven
> weeks without any review.

Objective C is a foreign language.  Andreas is the Cocoa maintainer so
I've been waiting for him.  Andreas, if you don't have time to look at
these patches, I can apply them directly.

Regards,

Anthony Liguori

>
> thanks
> -- PMM
>
> On 2 May 2013 11:29, Peter Maydell <peter.maydell@linaro.org> wrote:
>> Ping!
>>
>> -- PMM
>>
>> On 22 April 2013 21:29, Peter Maydell <peter.maydell@linaro.org> wrote:
>>> These patches fix various compiler and runtime warnings QEMU provokes
>>> on MacOSX 10.8. The first two fix a leak and some deprecated functions
>>> which cause warnings in the system log when QEMU runs. The second
>>> two avoid some functions which cause compile time warnings about
>>> use of functions deprecated in 10.6.
>>>
>>> I believe from my reading of the documentation that these changes
>>> should still work OK on 10.3, but I don't have any way of testing that.
>>>
>>> Andreas: I don't write much ObjC so I don't really have a feel for
>>> what is good coding style. I mostly tried to follow the existing
>>> code (eg "//" style comments) and QEMU's C style (eg 80 cols max).
>>> I'm happy to change any of the indentation or whatever to suit your
>>> preferences.
>>>
>>> With this patch set the only remaining compile time warnings from clang
>>> on 10.8 are about deprecated methods in audio/coreaudio.c.
>>>
>>> Changes v2->v3:
>>>  * rebased again
>>> Changes v1->v2:
>>>  * rebased and fixed up following recent console changes
>>>
>>> Peter Maydell (4):
>>>   ui/cocoa.m: Fix leaks of NSScreen and NSConcreteMapTable
>>>   ui/cocoa.m: Avoid deprecated CPS* functions
>>>   ui/cocoa.m: Avoid deprecated NSOpenPanel filename method
>>>   ui/cocoa.m: Avoid deprecated NSOpenPanel beginSheetForDirectory
>>>
>>>  ui/cocoa.m | 52 ++++++++++++++++++++++++++++++++--------------------
>>>  1 file changed, 32 insertions(+), 20 deletions(-)
>>>
>>> --
>>> 1.7.11.4
>>>
>>>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH v3 0/4] ui/cocoa.m: Fix compiler and runtime warnings on 10.8
  2013-05-28 17:01     ` Anthony Liguori
@ 2013-05-28 17:22       ` Andreas Färber
  2013-05-28 17:46         ` Peter Maydell
  0 siblings, 1 reply; 11+ messages in thread
From: Andreas Färber @ 2013-05-28 17:22 UTC (permalink / raw)
  To: Anthony Liguori, Peter Maydell; +Cc: qemu-devel, patches

Am 28.05.2013 19:01, schrieb Anthony Liguori:
> Peter Maydell <peter.maydell@linaro.org> writes:
> 
>> Ping again! This patchset has now been on the list for eleven
>> weeks without any review.
> 
> Objective C is a foreign language.

For that reason I've been applying our C Coding Style for indentation
and spacing, but the code was full of // comments that I did not bother
to change.

>  Andreas is the Cocoa maintainer so
> I've been waiting for him.  Andreas, if you don't have time to look at
> these patches, I can apply them directly.

I've looked at the patches today seeing the ping and they look fine - I
wasn't properly CC'ed before (get_maintainer.pl would've spared the
typo!) and so they were simply not in my mailbox.

I'll try to test on v10.5 tonight. Peter and me had already agreed
upfront that there's no point in maintaining < v10.3 code any more.

BTW if Peter or someone wants to take over Cocoa (co-)maintenance that
would be fine with me.

Regards,
Andreas

> 
> Regards,
> 
> Anthony Liguori
> 
>>
>> thanks
>> -- PMM
>>
>> On 2 May 2013 11:29, Peter Maydell <peter.maydell@linaro.org> wrote:
>>> Ping!
>>>
>>> -- PMM
>>>
>>> On 22 April 2013 21:29, Peter Maydell <peter.maydell@linaro.org> wrote:
>>>> These patches fix various compiler and runtime warnings QEMU provokes
>>>> on MacOSX 10.8. The first two fix a leak and some deprecated functions
>>>> which cause warnings in the system log when QEMU runs. The second
>>>> two avoid some functions which cause compile time warnings about
>>>> use of functions deprecated in 10.6.
>>>>
>>>> I believe from my reading of the documentation that these changes
>>>> should still work OK on 10.3, but I don't have any way of testing that.
>>>>
>>>> Andreas: I don't write much ObjC so I don't really have a feel for
>>>> what is good coding style. I mostly tried to follow the existing
>>>> code (eg "//" style comments) and QEMU's C style (eg 80 cols max).
>>>> I'm happy to change any of the indentation or whatever to suit your
>>>> preferences.
>>>>
>>>> With this patch set the only remaining compile time warnings from clang
>>>> on 10.8 are about deprecated methods in audio/coreaudio.c.
>>>>
>>>> Changes v2->v3:
>>>>  * rebased again
>>>> Changes v1->v2:
>>>>  * rebased and fixed up following recent console changes
>>>>
>>>> Peter Maydell (4):
>>>>   ui/cocoa.m: Fix leaks of NSScreen and NSConcreteMapTable
>>>>   ui/cocoa.m: Avoid deprecated CPS* functions
>>>>   ui/cocoa.m: Avoid deprecated NSOpenPanel filename method
>>>>   ui/cocoa.m: Avoid deprecated NSOpenPanel beginSheetForDirectory
>>>>
>>>>  ui/cocoa.m | 52 ++++++++++++++++++++++++++++++++--------------------
>>>>  1 file changed, 32 insertions(+), 20 deletions(-)
>>>>
>>>> --
>>>> 1.7.11.4
>>>>
>>>>
> 
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH v3 0/4] ui/cocoa.m: Fix compiler and runtime warnings on 10.8
  2013-05-28 17:22       ` Andreas Färber
@ 2013-05-28 17:46         ` Peter Maydell
  0 siblings, 0 replies; 11+ messages in thread
From: Peter Maydell @ 2013-05-28 17:46 UTC (permalink / raw)
  To: Andreas Färber; +Cc: Anthony Liguori, qemu-devel, patches

On 28 May 2013 18:22, Andreas Färber <andreas.faerber@web.de> wrote:
> I've looked at the patches today seeing the ping and they look fine - I
> wasn't properly CC'ed before (get_maintainer.pl would've spared the
> typo!) and so they were simply not in my mailbox.

Augh, sorry -- no idea where that other address came from.
(it doesn't bounce, or I'd have noticed before; I wonder what
poor unfortunate has been being sent qemu patches...)

> I'll try to test on v10.5 tonight. Peter and me had already agreed
> upfront that there's no point in maintaining < v10.3 code any more.
>
> BTW if Peter or someone wants to take over Cocoa (co-)maintenance that
> would be fine with me.

I don't object to being listed as a co-maintainer if you think
it would be helpful, though the only MacOS system I have is this
10.8 one.

thanks
-- PMM

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH v3 0/4] ui/cocoa.m: Fix compiler and runtime warnings on 10.8
  2013-04-22 20:29 [Qemu-devel] [PATCH v3 0/4] ui/cocoa.m: Fix compiler and runtime warnings on 10.8 Peter Maydell
                   ` (4 preceding siblings ...)
  2013-05-02 10:29 ` [Qemu-devel] [PATCH v3 0/4] ui/cocoa.m: Fix compiler and runtime warnings on 10.8 Peter Maydell
@ 2013-05-28 23:42 ` Andreas Färber
  5 siblings, 0 replies; 11+ messages in thread
From: Andreas Färber @ 2013-05-28 23:42 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Anthony Liguori, qemu-devel, patches

Am 22.04.2013 22:29, schrieb Peter Maydell:
> These patches fix various compiler and runtime warnings QEMU provokes
> on MacOSX 10.8. The first two fix a leak and some deprecated functions
> which cause warnings in the system log when QEMU runs. The second
> two avoid some functions which cause compile time warnings about
> use of functions deprecated in 10.6.
> 
> I believe from my reading of the documentation that these changes
> should still work OK on 10.3, but I don't have any way of testing that.
> 
> Andreas: I don't write much ObjC so I don't really have a feel for
> what is good coding style. I mostly tried to follow the existing
> code (eg "//" style comments) and QEMU's C style (eg 80 cols max).
> I'm happy to change any of the indentation or whatever to suit your
> preferences.
> 
> With this patch set the only remaining compile time warnings from clang
> on 10.8 are about deprecated methods in audio/coreaudio.c.

And it doesn't introduce any new issues on v10.5.

Thanks, applied to cocoa-for-upstream (with shortened prefix):
http://repo.or.cz/w/qemu/afaerber.git/shortlog/refs/heads/cocoa-for-upstream

Sorry for the delay, pull coming up.

Andreas

> Changes v2->v3:
>  * rebased again
> Changes v1->v2:
>  * rebased and fixed up following recent console changes
> 
> Peter Maydell (4):
>   ui/cocoa.m: Fix leaks of NSScreen and NSConcreteMapTable
>   ui/cocoa.m: Avoid deprecated CPS* functions
>   ui/cocoa.m: Avoid deprecated NSOpenPanel filename method
>   ui/cocoa.m: Avoid deprecated NSOpenPanel beginSheetForDirectory
> 
>  ui/cocoa.m | 52 ++++++++++++++++++++++++++++++++--------------------
>  1 file changed, 32 insertions(+), 20 deletions(-)
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-05-28 23:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-22 20:29 [Qemu-devel] [PATCH v3 0/4] ui/cocoa.m: Fix compiler and runtime warnings on 10.8 Peter Maydell
2013-04-22 20:29 ` [Qemu-devel] [PATCH v3 1/4] ui/cocoa.m: Fix leaks of NSScreen and NSConcreteMapTable Peter Maydell
2013-04-22 20:29 ` [Qemu-devel] [PATCH v3 2/4] ui/cocoa.m: Avoid deprecated CPS* functions Peter Maydell
2013-04-22 20:29 ` [Qemu-devel] [PATCH v3 3/4] ui/cocoa.m: Avoid deprecated NSOpenPanel filename method Peter Maydell
2013-04-22 20:29 ` [Qemu-devel] [PATCH v3 4/4] ui/cocoa.m: Avoid deprecated NSOpenPanel beginSheetForDirectory Peter Maydell
2013-05-02 10:29 ` [Qemu-devel] [PATCH v3 0/4] ui/cocoa.m: Fix compiler and runtime warnings on 10.8 Peter Maydell
2013-05-28 15:30   ` Peter Maydell
2013-05-28 17:01     ` Anthony Liguori
2013-05-28 17:22       ` Andreas Färber
2013-05-28 17:46         ` Peter Maydell
2013-05-28 23:42 ` Andreas Färber

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.