From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [Xen-devel V2] sedf/build: Fix build when using -fno-inline Date: Wed, 3 Oct 2012 13:38:40 +0100 Message-ID: <506C31D0.4060702@citrix.com> References: <506C3123.5050700@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030701010504020102080609" Return-path: In-Reply-To: <506C3123.5050700@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "xen-devel@lists.xen.org" , Dario Faggioli , "Keir (Xen.org)" , Jan Beulich List-Id: xen-devel@lists.xenproject.org --------------030701010504020102080609 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit On 03/10/12 13:35, Andrew Cooper wrote: > I found this issue while trying to debug on a separate issue. It > certainly affects unstable thru 4.1, and probably earlier, so should be > take for backport. > Apologies - try this patch which has less Unicode in the commit message. -- Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer T: +44 (0)1223 225 900, http://www.citrix.com --------------030701010504020102080609 Content-Type: text/x-patch; name="fix-no-inline-build.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fix-no-inline-build.patch" # HG changeset patch # Parent 5fbdbf585f5f2ee9a3e3c75a8a9f9f2cc6eda65c sedf/build: Fix build when using -fno-inline struct task_slice.migrated is not initialised by this function, and subsequently returned by value, leading to the error: sched_sedf.c: In function 'sedf_do_extra_schedule': sched_sedf.c:711: error: 'ret.migrated' may be used uninitialised in this function for both gcc 4.1.2 and 4.4.3 (which are the two I have easily to hand) when combined with the -fno-inline compile option. Signed-off-by Andrew Cooper -- This is compile tested only, but given that the sole caller of sedf_do_extra_schedule() unconditionally sets migrated to 0, I am fairly confident of the correctness of the fix. Changes since v1: - Fix unicode issue in comment. diff -r 5fbdbf585f5f xen/common/sched_sedf.c --- a/xen/common/sched_sedf.c +++ b/xen/common/sched_sedf.c @@ -667,7 +667,7 @@ static void desched_extra_dom(s_time_t n static struct task_slice sedf_do_extra_schedule( s_time_t now, s_time_t end_xt, struct list_head *extraq[], int cpu) { - struct task_slice ret; + struct task_slice ret = { 0 }; struct sedf_vcpu_info *runinf; ASSERT(end_xt > now); --------------030701010504020102080609 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --------------030701010504020102080609--