<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forums.obdev.at/app.php/feed/topic/8722" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2013-11-14T22:34:46+02:00</updated>

	<author><name><![CDATA[Objective Development Forums]]></name></author>
	<id>https://forums.obdev.at/app.php/feed/topic/8722</id>

		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2013-11-14T22:34:46+02:00</updated>

		<published>2013-11-14T22:34:46+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=8722&amp;p=26179#p26179</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=8722&amp;p=26179#p26179"/>
		<title type="html"><![CDATA[Re: Char signedness bug in usbGenericSetInterrupt() [fixed]]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=8722&amp;p=26179#p26179"><![CDATA[
It has been fixed months ago, but I forgot to commit and push it. The commit message is also a bit confusing since I did not remember what that particular fix was good for.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Thu Nov 14, 2013 10:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[blargg]]></name></author>
		<updated>2013-11-14T22:24:03+02:00</updated>

		<published>2013-11-14T22:24:03+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=8722&amp;p=26177#p26177</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=8722&amp;p=26177#p26177"/>
		<title type="html"><![CDATA[Re: V-USB assumes that char is signed?!?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=8722&amp;p=26177#p26177"><![CDATA[
OK, so it does not assume that char is signed, and what I found today was a bug and happened to be fixed two days ago. Hah.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=20076">blargg</a> — Thu Nov 14, 2013 10:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2013-11-14T22:16:38+02:00</updated>

		<published>2013-11-14T22:16:38+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=8722&amp;p=26176#p26176</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=8722&amp;p=26176#p26176"/>
		<title type="html"><![CDATA[Re: V-USB assumes that char is signed?!?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=8722&amp;p=26176#p26176"><![CDATA[
Please check out the current head on the master branch on github:<br /><br /><!-- m --><a class="postlink" href="https://github.com/obdev/v-usb">https://github.com/obdev/v-usb</a><!-- m --><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Thu Nov 14, 2013 10:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[blargg]]></name></author>
		<updated>2013-11-14T22:28:38+02:00 </updated>

		<published>2013-11-14T22:03:52+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=8722&amp;p=26174#p26174</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=8722&amp;p=26174#p26174"/>
		<title type="html"><![CDATA[Char signedness bug in usbGenericSetInterrupt() [fixed]]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=8722&amp;p=26174#p26174"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>static void usbGenericSetInterrupt(uchar *data, uchar len, usbTxStatus_t *txStatus)<br />{<br />uchar   *p;<br />char    i;<br /><br />&#91;...&#93;<br />    i = len;<br />    do{                         /* if len == 0, we still copy 1 byte, but that's no problem */<br />        *p++ = *data++;<br />    }while(--i &gt; 0);            /* loop control at the end is 2 bytes shorter than at beginning */<br />&#91;...&#93;<br /></code></pre></div><br /><br />It sure seems it's assuming that char is signed. It's common to use -funsigned-char to avoid unnecessary sign-extension, which would apparently break the above code. There is an schar in usbdrv.h:<br /><br /><div class="codebox"><p>Code: </p><pre><code>#ifndef schar<br />#define schar   signed char<br />#endif</code></pre></div><br /><br />so it doesn't seem they want to rely on char being signed.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=20076">blargg</a> — Thu Nov 14, 2013 10:03 pm</p><hr />
]]></content>
	</entry>
	</feed>
