[vlc-commits] macosx: fixed format-security warnings introduced in recent clang releases

Felix Paul Kühne git at videolan.org
Thu Nov 15 20:52:34 CET 2012


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Thu Nov 15 20:43:41 2012 +0100| [93b8dfeb29e0460b073a4afc43124adfc560ebe3] | committer: Felix Paul Kühne

macosx: fixed format-security warnings introduced in recent clang releases

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=93b8dfeb29e0460b073a4afc43124adfc560ebe3
---

 modules/gui/macosx/bookmarks.m    |    8 ++++----
 modules/gui/macosx/intf.m         |    2 +-
 modules/gui/macosx/prefs.m        |    2 +-
 modules/gui/macosx/simple_prefs.m |    2 +-
 modules/gui/macosx/wizard.m       |   16 ++++++++--------
 5 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/modules/gui/macosx/bookmarks.m b/modules/gui/macosx/bookmarks.m
index af80ddf..aa87abf 100644
--- a/modules/gui/macosx/bookmarks.m
+++ b/modules/gui/macosx/bookmarks.m
@@ -207,11 +207,11 @@ static VLCBookmarks *_o_sharedInstance = nil;
     input_thread_t * p_input = pl_CurrentInput(VLCIntf);
 
     if (!p_input) {
-        NSBeginCriticalAlertSheet(_NS("No input"), _NS("OK"), @"", @"", o_bookmarks_window, nil, nil, nil, nil, _NS("No input found. A stream must be playing or paused for bookmarks to work."));
+        NSBeginCriticalAlertSheet(_NS("No input"), _NS("OK"), @"", @"", o_bookmarks_window, nil, nil, nil, nil, @"%@",_NS("No input found. A stream must be playing or paused for bookmarks to work."));
         return;
     }
     if (p_old_input != p_input) {
-        NSBeginCriticalAlertSheet(_NS("Input has changed"), _NS("OK"), @"", @"", o_bookmarks_window, nil, nil, nil, nil, _NS("Input has changed, unable to save bookmark. Suspending playback with \"Pause\" while editing bookmarks to ensure to keep the same input."));
+        NSBeginCriticalAlertSheet(_NS("Input has changed"), _NS("OK"), @"", @"", o_bookmarks_window, nil, nil, nil, nil, @"%@",_NS("Input has changed, unable to save bookmark. Suspending playback with \"Pause\" while editing bookmarks to ensure to keep the same input."));
         vlc_object_release(p_input);
         return;
     }
@@ -262,12 +262,12 @@ clear:
 - (IBAction)extract:(id)sender
 {
     if ([o_tbl_dataTable numberOfSelectedRows] < 2) {
-        NSBeginAlertSheet(_NS("Invalid selection"), _NS("OK"), @"", @"", o_bookmarks_window, nil, nil, nil, nil, _NS("Two bookmarks have to be selected."));
+        NSBeginAlertSheet(_NS("Invalid selection"), _NS("OK"), @"", @"", o_bookmarks_window, nil, nil, nil, nil, @"%@",_NS("Two bookmarks have to be selected."));
         return;
     }
     input_thread_t * p_input = pl_CurrentInput(VLCIntf);
     if (!p_input) {
-        NSBeginCriticalAlertSheet(_NS("No input found"), _NS("OK"), @"", @"", o_bookmarks_window, nil, nil, nil, nil, _NS("The stream must be playing or paused for bookmarks to work."));
+        NSBeginCriticalAlertSheet(_NS("No input found"), _NS("OK"), @"", @"", o_bookmarks_window, nil, nil, nil, nil, @"%@",_NS("The stream must be playing or paused for bookmarks to work."));
         return;
     }
 
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index f809686..b484ca4 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -1725,7 +1725,7 @@ static VLCMain *_o_sharedMainInstance = nil;
     if (latestLog) {
         [[NSWorkspace sharedWorkspace] openFile: latestLog withApplication: @"Console"];
     } else {
-        NSBeginInformationalAlertSheet(_NS("No CrashLog found"), _NS("Continue"), nil, nil, o_msgs_panel, self, NULL, NULL, nil, _NS("Couldn't find any trace of a previous crash."));
+        NSBeginInformationalAlertSheet(_NS("No CrashLog found"), _NS("Continue"), nil, nil, o_msgs_panel, self, NULL, NULL, nil, @"%@", _NS("Couldn't find any trace of a previous crash."));
     }
 }
 
diff --git a/modules/gui/macosx/prefs.m b/modules/gui/macosx/prefs.m
index 36cc287..2174551 100644
--- a/modules/gui/macosx/prefs.m
+++ b/modules/gui/macosx/prefs.m
@@ -228,7 +228,7 @@ static VLCPrefs *_o_sharedMainInstance = nil;
 {
     NSBeginInformationalAlertSheet(_NS("Reset Preferences"), _NS("Cancel"),
         _NS("Continue"), nil, o_prefs_window, self,
-        @selector(sheetDidEnd: returnCode: contextInfo:), NULL, nil,
+        @selector(sheetDidEnd: returnCode: contextInfo:), NULL, nil, @"%@",
         _NS("Beware this will reset the VLC media player preferences.\n"
             "Are you sure you want to continue?"));
 }
diff --git a/modules/gui/macosx/simple_prefs.m b/modules/gui/macosx/simple_prefs.m
index 6994a3d..fdaf529 100644
--- a/modules/gui/macosx/simple_prefs.m
+++ b/modules/gui/macosx/simple_prefs.m
@@ -682,7 +682,7 @@ static inline char * __config_GetLabel(vlc_object_t *p_this, const char *psz_nam
     } else if (sender == o_sprefs_reset_btn)
         NSBeginInformationalAlertSheet(_NS("Reset Preferences"), _NS("Cancel"),
                                         _NS("Continue"), nil, o_sprefs_win, self,
-                                        @selector(sheetDidEnd: returnCode: contextInfo:), NULL, nil,
+                                        @selector(sheetDidEnd: returnCode: contextInfo:), NULL, nil, @"%@",
                                         _NS("Beware this will reset the VLC media player preferences.\n"
                                             "Are you sure you want to continue?"));
     else if (sender == o_sprefs_showAll_btn) {
diff --git a/modules/gui/macosx/wizard.m b/modules/gui/macosx/wizard.m
index ffcedef..bc7bafd 100644
--- a/modules/gui/macosx/wizard.m
+++ b/modules/gui/macosx/wizard.m
@@ -596,7 +596,7 @@ static VLCWizard *_o_sharedInstance = nil;
         } else {
             /* show a sheet that the user didn't select a file */
             NSBeginInformationalAlertSheet(_NS("No input selected"),
-                _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
+                _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, @"%@",
                 _NS("No new stream or valid playlist item has been selected.\n\n"
                 "Choose one before going to the next page."));
         }
@@ -658,7 +658,7 @@ static VLCWizard *_o_sharedInstance = nil;
             {
                 /* complain to the user that "" is no valid dest. */
                 NSBeginInformationalAlertSheet(_NS("No valid destination"),
-                    _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
+                    _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, @"%@",
                     _NS("A valid destination has to be selected "
                     "Enter either a Unicast-IP or a Multicast-IP."
                     "\n\nIf you don't know what this means, have a look at "
@@ -998,7 +998,7 @@ static VLCWizard *_o_sharedInstance = nil;
         } else {
             /* show a sheet that the selected codecs are not compatible */
             NSBeginInformationalAlertSheet(_NS("Invalid selection"), _NS("OK"),
-                @"", @"", o_wizard_window, nil, nil, nil, nil, _NS("The "
+                @"", @"", o_wizard_window, nil, nil, nil, nil, @"%@", _NS("The "
                 "chosen codecs are not compatible with each other. For example: "
                 "It is not possible to mix uncompressed audio with any video codec.\n\n"
                 "Correct your selection and try again."));
@@ -1618,7 +1618,7 @@ static VLCWizard *_o_sharedInstance = nil;
 {
     /* show a sheet for the help */
     NSBeginInformationalAlertSheet(_NS("Stream to network"),
-        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
+        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, @"%@",
         _NS("This allows streaming on a network."));
 }
 
@@ -1626,7 +1626,7 @@ static VLCWizard *_o_sharedInstance = nil;
 {
     /* show a sheet for the help */
     NSBeginInformationalAlertSheet(_NS("Transcode/Save to file"),
-        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
+        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, @"%@",
         _NS("This allows saving a stream to a file. The "
         "can be reencoded on the fly. Whatever "
         "VLC can read can be saved.\nPlease note that VLC is not very suited "
@@ -1798,7 +1798,7 @@ static VLCWizard *_o_sharedInstance = nil;
 {
     /* show a sheet for the help */
     NSBeginInformationalAlertSheet(_NS("Time-To-Live (TTL)"),
-        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
+        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, @"%@",
         _NS("This allows defining the TTL (Time-To-Live) of the stream. "
             "This parameter is the maximum number of routers your stream can "
             "go through. If you don't know what it means, or if you want to "
@@ -1809,7 +1809,7 @@ static VLCWizard *_o_sharedInstance = nil;
 {
     /* show a sheet for the help */
     NSBeginInformationalAlertSheet(_NS("SAP Announce"),
-        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
+        _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, @"%@",
         _NS("When streaming using UDP, the streams can be "
         "announced using the SAP/SDP announcing protocol. This "
         "way, the clients won't have to type in the multicast address, it "
@@ -1822,7 +1822,7 @@ static VLCWizard *_o_sharedInstance = nil;
 {
     /* show a sheet for the help */
     NSBeginInformationalAlertSheet(_NS("Local playback"),
-            _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil,
+            _NS("OK"), @"", @"", o_wizard_window, nil, nil, nil, nil, @"%@",
             _NS("When this option is enabled, the stream will be both played "
             "and transcoded/streamed.\n\nNote that this requires much more "
             "CPU power than simple transcoding or streaming."));



More information about the vlc-commits mailing list