<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/lib/ccan/cast/test, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/'/>
<entry>
<title>cast: make sure suncc sees a constant.</title>
<updated>2012-03-29T06:18:57+00:00</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2012-03-29T04:28:33+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=f74ae3257a2edb9756d9f0442c1314306e936759'/>
<id>f74ae3257a2edb9756d9f0442c1314306e936759</id>
<content type='text'>
cast_const() et. al. are supposed to be a constant expression, so you can do things like:
	static char *p = cast_const(char *, (const char *)"hello");

Unfortunately, a cast to intptr_t and arithmetic makes suncc reject it as
a constant expression.  We need the cast, because (1) the expression could be
a void *, so we can't just add to it, and (2) gcc complains with -Wcast-qual
without it.

So instead of adding BUILD_BUG_OR_ZERO, we use a ? :, which keeps everyone happy.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
(Imported from CCAN commit 74859ab18b10aaf990848e49d7789ff5c6cf96c6)

Autobuild-User: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Autobuild-Date: Thu Mar 29 08:18:57 CEST 2012 on sn-devel-104
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
cast_const() et. al. are supposed to be a constant expression, so you can do things like:
	static char *p = cast_const(char *, (const char *)"hello");

Unfortunately, a cast to intptr_t and arithmetic makes suncc reject it as
a constant expression.  We need the cast, because (1) the expression could be
a void *, so we can't just add to it, and (2) gcc complains with -Wcast-qual
without it.

So instead of adding BUILD_BUG_OR_ZERO, we use a ? :, which keeps everyone happy.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
(Imported from CCAN commit 74859ab18b10aaf990848e49d7789ff5c6cf96c6)

Autobuild-User: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Autobuild-Date: Thu Mar 29 08:18:57 CEST 2012 on sn-devel-104
</pre>
</div>
</content>
</entry>
<entry>
<title>cast: test/compile_fail-cast_static.c should fail without COMPOUND_LITERALS.</title>
<updated>2012-03-29T04:44:30+00:00</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2012-03-27T05:10:45+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=be25ab9c8df2f96ee10929fdfee582935b2f0e06'/>
<id>be25ab9c8df2f96ee10929fdfee582935b2f0e06</id>
<content type='text'>
It still gave a warning on gcc, because casting a char to a char* gives a warning.  Not so on sun CC.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
(Imported from CCAN commit 6569a707d169a629e25e10710c760c8dc84525c7)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It still gave a warning on gcc, because casting a char to a char* gives a warning.  Not so on sun CC.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
(Imported from CCAN commit 6569a707d169a629e25e10710c760c8dc84525c7)
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: import ccan modules for tdb2</title>
<updated>2011-06-20T09:18:34+00:00</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2011-06-20T07:24:15+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=754c677b0bbf3ea6c7d2a73c93848f1b0d68c91e'/>
<id>754c677b0bbf3ea6c7d2a73c93848f1b0d68c91e</id>
<content type='text'>
Imported from git://git.ozlabs.org/~ccan/ccan init-1161-g661d41f

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Imported from git://git.ozlabs.org/~ccan/ccan init-1161-g661d41f

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;

</pre>
</div>
</content>
</entry>
</feed>
