Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Dec 2012 13:55:32 GMT
From:      Ruslan Makhmatkhanov <rm@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/174434: multimedia/cheese: fix build with clang
Message-ID:  <201212141355.qBEDtWM7021200@red.freebsd.org>
Resent-Message-ID: <201212141400.qBEE00fF055179@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         174434
>Category:       ports
>Synopsis:       multimedia/cheese: fix build with clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 14 14:00:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Ruslan Makhmatkhanov
>Release:        10.0-CURRENT
>Organization:
>Environment:
10.0-CURRENT amd64
>Description:
cheese-camera-device-monitor.c:109:5: error: non-void function 'cheese_camera_device_monitor_handle_udi' should return a value [-Wreturn-type]
    return;
 
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: files/patch-libcheese_cheese-camera-device-monitor.c
===================================================================
--- files/patch-libcheese_cheese-camera-device-monitor.c	(revision 308902)
+++ files/patch-libcheese_cheese-camera-device-monitor.c	(working copy)
@@ -1,5 +1,5 @@
---- libcheese/cheese-camera-device-monitor.c.orig	2010-08-16 23:00:43.000000000 +0200
-+++ libcheese/cheese-camera-device-monitor.c	2010-08-18 09:51:48.000000000 +0200
+--- ./libcheese/cheese-camera-device-monitor.c.orig	2010-09-27 13:54:58.000000000 +0400
++++ ./libcheese/cheese-camera-device-monitor.c	2012-12-14 17:42:42.000000000 +0400
 @@ -24,24 +24,11 @@
  #endif
  
@@ -40,7 +40,7 @@
   * CheeseCameraDeviceMonitor::added or
   * CheeseCameraDeviceMonitor::removed signal when an event happens.
   */
-@@ -80,11 +67,9 @@ enum CheeseCameraDeviceMonitorError
+@@ -80,11 +67,9 @@
  
  typedef struct
  {
@@ -54,12 +54,12 @@
  } CheeseCameraDeviceMonitorPrivate;
  
  enum
-@@ -102,111 +87,77 @@ cheese_camera_device_monitor_error_quark
+@@ -102,111 +87,78 @@
    return g_quark_from_static_string ("cheese-camera-error-quark");
  }
  
 -#ifdef HAVE_UDEV
--static void
+ static void
 -cheese_camera_device_monitor_added (CheeseCameraDeviceMonitor *monitor,
 -                                    GUdevDevice               *udevice)
 +cheese_camera_device_monitor_handle_udi (CheeseCameraDeviceMonitor *monitor,
@@ -139,9 +139,7 @@
  
 -  v4l_version = g_udev_device_get_property_as_int (udevice, "ID_V4L_VERSION");
 -  if (v4l_version == 2 || v4l_version == 1)
-+  capstr = libhal_device_get_property_string (priv->hal_ctx, udi, "video4linux.version", &error);
-+  if (dbus_error_is_set (&error))
-   {
+-  {
 -    const char *caps;
 -
 -    caps = g_udev_device_get_property (udevice, "ID_V4L_CAPABILITIES");
@@ -154,7 +152,9 @@
 -    product_name  = g_udev_device_get_property (udevice, "ID_V4L_PRODUCT");
 -  }
 -  else if (v4l_version == 0)
--  {
++  capstr = libhal_device_get_property_string (priv->hal_ctx, udi, "video4linux.version", &error);
++  if (dbus_error_is_set (&error))
+   {
 -    GST_ERROR ("Fix your udev installation to include v4l_id, ignoring %s", device_file);
 +    GST_WARNING ("error getting V4L version for %s: %s: %s", udi, error.name, error.message);
 +    dbus_error_free (&error);
@@ -210,7 +210,7 @@
  }
  
  /**
-@@ -222,115 +173,85 @@ void
+@@ -222,115 +174,85 @@
  cheese_camera_device_monitor_coldplug (CheeseCameraDeviceMonitor *monitor)
  {
    CheeseCameraDeviceMonitorPrivate *priv = CHEESE_CAMERA_DEVICE_MONITOR_GET_PRIVATE (monitor);
@@ -375,22 +375,21 @@
    G_OBJECT_CLASS (cheese_camera_device_monitor_parent_class)->finalize (object);
  }
  
-@@ -385,14 +306,52 @@ cheese_camera_device_monitor_class_init 
+@@ -385,14 +307,52 @@
  static void
  cheese_camera_device_monitor_init (CheeseCameraDeviceMonitor *monitor)
  {
 -#ifdef HAVE_UDEV
 -  CheeseCameraDeviceMonitorPrivate *priv         = CHEESE_CAMERA_DEVICE_MONITOR_GET_PRIVATE (monitor);
 -  const gchar *const                subsystems[] = {"video4linux", NULL};
--
++  CheeseCameraDeviceMonitorPrivate *priv = CHEESE_CAMERA_DEVICE_MONITOR_GET_PRIVATE (monitor);
++  LibHalContext *hal_ctx;
++  DBusError      error;
+ 
 -  priv->client = g_udev_client_new (subsystems);
 -  g_signal_connect (G_OBJECT (priv->client), "uevent",
 -                    G_CALLBACK (cheese_camera_device_monitor_uevent_cb), monitor);
 -#endif /* HAVE_UDEV */
-+  CheeseCameraDeviceMonitorPrivate *priv = CHEESE_CAMERA_DEVICE_MONITOR_GET_PRIVATE (monitor);
-+  LibHalContext *hal_ctx;
-+  DBusError      error;
-+
 +  dbus_error_init (&error);
 +
 +  priv->connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error);


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212141355.qBEDtWM7021200>