From: Ananth Subject: Fwd: Error while compiling with new RR scheduler Date: Fri, 24 Apr 2009 20:43:56 +0530 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=00163628382818d3f104684e72c0 Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --00163628382818d3f104684e72c0 Content-Type: multipart/alternative; boundary=00163628382818d3e804684e72be --00163628382818d3e804684e72be Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hi, I figured out that the error was because of a missing ' ; ' . This has been fixed now. I have attached the modified code. While compiling I am getting the below error message. cc1: warnings being treated as errors sched_rrobin.c: In function =91rrobin_schedule=92: sched_rrobin.c:74: error: =91ret.task=92 may be used uninitialized in this function Please guide. Thanks & Regards Ananth ---------- Forwarded message ---------- From: Ananth Date: Fri, Apr 24, 2009 at 7:25 PM Subject: Error while compiling with new RR scheduler To: "xen-devel@lists.xensource.com" Hi, Please find attached the source code of Round Robin scheduler which I am trying to add to Xen 3.3.1. I am facing the following error messages while compiling the same. sched_rrobin.c:31: error: two or more data types in declaration specifiers sched_rrobin.c: In function =91rrobin_vcpu_init=92: sched_rrobin.c:34: error: incompatible types in return sched_rrobin.c:51: error: incompatible types in return sched_rrobin.c:94: error: initialization from incompatible pointer type I believe the error in line 94 is causing the rest of the error messages. I have checked with the structure definition in sched-if.h as well as the implementation of the same in other schedulers such as SEDF and Credit. Request you to kindly provide your feedback regarding the same. Thanks & Regards Ananth --00163628382818d3e804684e72be Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hi,
I figured out that the error was because of a missing ' ; ' = . This has been fixed now. I have attached the modified code.
While comp= iling I am getting the below error message.

cc1: warnings being trea= ted as errors
sched_rrobin.c: In function =91rrobin_schedule=92:
sched_rrobin.c:74: er= ror: =91ret.task=92 may be used uninitialized in this function

Pleas= e guide.

Thanks & Regards
Ananth


---------- Forwarded message ----------
From: Ananth <= cbananth@gmail.com>
Date: Fri, Apr 24, 2009 at 7:25 PM
= Subject: Error while compiling with new RR scheduler
To: "xen-devel@lists.= xensource.com" <xen-devel@lists.xensource.com>


Hi,
Please find attac= hed the source code of Round Robin scheduler which I am trying to add to Xe= n 3.3.1.
I am facing the following error messages while compiling the same.

s= ched_rrobin.c:31: error: two or more data types in declaration specifiers
sched_rrobin.c: In function =91rrobin_vcpu_init=92:

sched_rrobin= .c:34: error: incompatible types in return

sched_rrobin.c:51: error:= incompatible types in return

sched_rrobin.c:94: error: initializati= on from incompatible pointer type

I believe the error in line 94 is causing the rest of the error message= s. I have checked with the structure definition in sched-if.h as well as th= e implementation of the same in other schedulers such as SEDF and Credit. <= br>
Request you to kindly provide your feedback regarding the same.

= Thanks & Regards
Ananth

--00163628382818d3e804684e72be-- --00163628382818d3f104684e72c0 Content-Type: text/x-c++src; charset=US-ASCII; name="sched_rrobin.c" Content-Disposition: attachment; filename="sched_rrobin.c" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ftx0vaxm1 I2luY2x1ZGUgPHhlbi9saWIuaD4KI2luY2x1ZGUgPHhlbi9zY2hlZC5oPgojaW5jbHVkZSA8eGVu L3RpbWUuaD4KI2luY2x1ZGUgPHhlbi9zY2hlZC1pZi5oPgojaW5jbHVkZSA8eGVuL3NvZnRpcnEu aD4KI2luY2x1ZGUgPHhlbi9lcnJuby5oPgojaW5jbHVkZSA8eGVuL2xpc3QuaD4KI2luY2x1ZGUg PHhlbi90aW1lci5oPgoKI2RlZmluZSBFRE9NX0lORk8oZCkgICAoKHN0cnVjdCBycm9iaW5fdmNw dV9pbmZvICopKChkKS0+c2NoZWRfcHJpdikpCiNkZWZpbmUgQ1BVX0lORk8oY3B1KSAgXAogICAg KChzdHJ1Y3QgcnJvYmluX2NwdV9pbmZvICopcGVyX2NwdShzY2hlZHVsZV9kYXRhLCBjcHUpLnNj aGVkX3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kKCk7CiAgICAvKnN0cnVjdCBycm9iaW5fdmNwdV9pbmZvICppbmYg PSBFRE9NX0lORk8oY3VycmVudCk7Ki8KICAgIHN0cnVjdCBycm9iaW5fdmNwdV9pbmZvICpydW5p bmY7CiAgICBzdHJ1Y3QgdmNwdSAqdGVtcDsKICAgIHN0cnVjdCB0YXNrX3NsaWNlIHJldDsKICAg IHJldC50aW1lID0gTUlMTElTRUNTKDEwKTsgLyogVGltZSBxdWFudHVtIHRvIHNjYW4gdGhlIFZD UFUgbGlzdCB0byBmaW5kIGEgcnVubmFibGUgVkNQVSAqLwoKICAgIHJ1bnEgPSBSVU5RKGNwdSk7 CgogICAgaWYgKCAhbGlzdF9lbXB0eShydW5xKSApewogICAgICAgIHJ1bmluZiAgID0gbGlzdF9l bnRyeShydW5xLT5uZXh0LHN0cnVjdCBycm9iaW5fdmNwdV9pbmZvLGxpc3QpOwogICAgICAgIHRl bXAgPSBydW5pbmYtPnZjcHU7CiAgICAgICAgcmV0LnRhc2sgPSB0ZW1wOwoKICAgIH0KCmluY3Jl bWVudF9ydW5fcXVldWUoKTsKCnJldHVybiByZXQ7Cn0KCnN0cnVjdCBzY2hlZHVsZXIgc2NoZWRf cnJvYmluX2RlZiA9IHsKICAgIC5uYW1lICAgICAgICAgICA9ICJSb3VuZCByb2JpbiBTY2hlZHVs ZXIiLAogICAgLm9wdF9uYW1lICAgICAgID0gInJyb2JpbiIsCiAgICAuc2NoZWRfaWQgICAgICAg PSBYRU5fU0NIRURVTEVSX1NFREYsCgogICAgLmluaXRfdmNwdSAgICAgID0gcnJvYmluX3ZjcHVf aW5pdCwKICAgIC5kZXN0cm95X3ZjcHUgICA9IHJyb2Jpbl92Y3B1X2Rlc3Ryb3ksCgogICAgLmRv X3NjaGVkdWxlICAgID0gcnJvYmluX3NjaGVkdWxlLAoKfTsKCgo= --00163628382818d3f104684e72c0 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.xensource.com http://lists.xensource.com/xen-devel --00163628382818d3f104684e72c0--