Re: Start of freeze for libvirt-0.9.10 and availability of rc1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/06/2012 11:41 AM, Eric Blake wrote:
>> 1.
>>   GEN    probes.o
>> /tmp/tmpOSBnp3.c:1: warning: return type defaults to 'int'
>> /tmp/tmpOSBnp3.c:1: warning: '__dtrace' defined but not used
>>   CC     libvirt_qemu_la-libvirt-qemu.lo
>>
>> Notes, maybe, we should silence the warning.
> 
> I'd like to; but doing that requires either patching
> systemtap-sdt-devel, or else post-processing the systemtap generated
> files prior to passing them to the compiler.  In other words, the
> warning is not coming from libvirt source code.

Postprocessing files prior to passing them to the compiler is not even
possible - 'dtrace' is converting the .d file straight to .o via an
embedded call to gcc, with no chance of us ever getting our hands on the
intermediate file (in your case, it was named /tmp/tmpOSBnp3.c, but this
name changes on every run of dtrace).  You may want to file a bugzilla
against dtrace, from the systemtap-sdt-devel package.

> 
>>
>> 2.
>>   CC     libvirtmod_qemu_la-libvirt-qemu-override.lo
>> libvirt-qemu-override.c:53: warning: 'py_str' defined but not used
>>   CC     libvirtmod_qemu_la-libvirt-qemu.lo
>>
>> Notes, it should be a useful function, maybe, we will use it later ...
> 
> We should fix this one.

Done - I'm pushing this under the trivial rule.

From 9fbbcda6b73e3c33b22a34e2f3dceefe60fc1a2a Mon Sep 17 00:00:00 2001
From: Eric Blake <eblake@xxxxxxxxxx>
Date: Tue, 7 Feb 2012 17:14:11 -0700
Subject: [PATCH] python: drop unused function

Gcc warned about an unused static function.

* python/libvirt-qemu-override.c (py_str): Delete.
---
 python/libvirt-qemu-override.c |   16 +---------------
 1 files changed, 1 insertions(+), 15 deletions(-)

diff --git a/python/libvirt-qemu-override.c b/python/libvirt-qemu-override.c
index 485c809..c220af1 100644
--- a/python/libvirt-qemu-override.c
+++ b/python/libvirt-qemu-override.c
@@ -4,7 +4,7 @@
  *           entry points where an automatically generated stub is
  *           unpractical
  *
- * Copyright (C) 2011 Red Hat, Inc.
+ * Copyright (C) 2011-2012 Red Hat, Inc.
  *
  * Daniel Veillard <veillard@xxxxxxxxxx>
  */
@@ -47,20 +47,6 @@ extern void initcygvirtmod_qemu(void);
 #define VIR_PY_INT_FAIL (libvirt_intWrap(-1))
 #define VIR_PY_INT_SUCCESS (libvirt_intWrap(0))

-/* We don't want to free() returned value. As written in doc:
- * PyString_AsString returns pointer to 'internal buffer of string,
- * not a copy' and 'It must not be deallocated'. */
-static char *py_str(PyObject *obj)
-{
-    PyObject *str = PyObject_Str(obj);
-    if (!str) {
-        PyErr_Print();
-        PyErr_Clear();
-        return NULL;
-    };
-    return PyString_AsString(str);
-}
-
 /************************************************************************
  *									*
  *		Statistics						*
-- 
1.7.7.6



-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]