aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlessandro Decina2011-06-30 05:46:55 -0500
committerNikhil Devshatwar2013-05-15 05:35:34 -0500
commit16a86560f8008884e44bbbdcc3696b9a5d05cb5f (patch)
treeddbbf222fcbb1bc955e1340e730c4e52284c1c93
parent59c24110082d59ffce3368f1118c03033722cd62 (diff)
downloadgst-plugins-base0-10-16a86560f8008884e44bbbdcc3696b9a5d05cb5f.tar.gz
gst-plugins-base0-10-16a86560f8008884e44bbbdcc3696b9a5d05cb5f.tar.xz
gst-plugins-base0-10-16a86560f8008884e44bbbdcc3696b9a5d05cb5f.zip
pbutils: fix compilation error in macro expansion
Fix: "encoding-target.c: In function 'get_locale': encoding-target.c:421: error: used struct type value where scalar is required" Rename a local variable from 'loc' to 'locale' since GST_LOG declares a variable called loc internally.
-rw-r--r--gst-libs/gst/pbutils/encoding-target.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gst-libs/gst/pbutils/encoding-target.c b/gst-libs/gst/pbutils/encoding-target.c
index f3002b7ea..c5ea30071 100644
--- a/gst-libs/gst/pbutils/encoding-target.c
+++ b/gst-libs/gst/pbutils/encoding-target.c
@@ -412,16 +412,16 @@ serialize_stream_profiles (GKeyFile * out, GstEncodingProfile * sprof,
412static gchar * 412static gchar *
413get_locale (void) 413get_locale (void)
414{ 414{
415 const char *loc = NULL; 415 const char *locale = NULL;
416 gchar *ret; 416 gchar *ret;
417 417
418#ifdef ENABLE_NLS 418#ifdef ENABLE_NLS
419#if defined(LC_MESSAGES) 419#if defined(LC_MESSAGES)
420 loc = setlocale (LC_MESSAGES, NULL); 420 locale = setlocale (LC_MESSAGES, NULL);
421 GST_LOG ("LC_MESSAGES: %s", GST_STR_NULL (loc)); 421 GST_LOG ("LC_MESSAGES: %s", GST_STR_NULL (locale));
422#elif defined(LC_ALL) 422#elif defined(LC_ALL)
423 loc = setlocale (LC_ALL, NULL); 423 locale = setlocale (LC_ALL, NULL);
424 GST_LOG ("LC_ALL: %s", GST_STR_NULL (loc)); 424 GST_LOG ("LC_ALL: %s", GST_STR_NULL (locale));
425#else 425#else
426 GST_LOG ("Neither LC_ALL nor LC_MESSAGES defined"); 426 GST_LOG ("Neither LC_ALL nor LC_MESSAGES defined");
427#endif 427#endif
@@ -429,11 +429,11 @@ get_locale (void)
429 GST_LOG ("i18n disabled"); 429 GST_LOG ("i18n disabled");
430#endif 430#endif
431 431
432 if (loc == NULL || g_ascii_strncasecmp (loc, "en", 2) == 0) 432 if (locale == NULL || g_ascii_strncasecmp (locale, "en", 2) == 0)
433 return NULL; 433 return NULL;
434 434
435 /* en_GB.UTF-8 => en */ 435 /* en_GB.UTF-8 => en */
436 ret = g_ascii_strdown (loc, -1); 436 ret = g_ascii_strdown (locale, -1);
437 ret = g_strcanon (ret, "abcdefghijklmnopqrstuvwxyz", '\0'); 437 ret = g_strcanon (ret, "abcdefghijklmnopqrstuvwxyz", '\0');
438 GST_LOG ("using locale: %s", ret); 438 GST_LOG ("using locale: %s", ret);
439 return ret; 439 return ret;