<div dir="ltr"><div class="gmail_default" style="font-family:'comic sans ms',sans-serif">Ah, I forgot to update that, it's CPUID_HIGHEST_EXTENDED_FUNCTION_SUPPORTED not CPU_ will fix it. Thanks!</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Sun, Dec 1, 2013 at 12:14 PM, Rusty Russell <span dir="ltr"><<a href="mailto:rusty@rustcorp.com.au" target="_blank">rusty@rustcorp.com.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">Ahmed Samy <<a href="mailto:f.fallen45@gmail.com">f.fallen45@gmail.com</a>> writes:<br>
> Hi!<br>
><br>
> Sorry for that..  I'm not quite sure if ccanlint has some special way of<br>
> dealing with the tests, but I always compile and run to make sure<br>
> everything is fine before pushing my commits.<br>
<br>
</div>It's the example which fails, BTW:<br>
<div class="im"><br>
$ ccanlint ccan/cpuid<br>
cpuid: Module examples compile (examples_compile): FAIL (+1/2)<br>
</div>/tmp/user/1000/ccanlint-24228.1804289383/example-_info-cpuid.c:Standalone compile and adding headers both failed<br>
cpuid: Total score: 32/42<br>
<br>
$ ccanlint -v ccan/cpuid -t examples_compile<br>
cpuid: _info and main header file have Example: sections (examples_exist): PASS (+1/2)<br>
/home/rusty/devel/cvs/ccan/ccan/cpuid/cpuid.h:No Example: section<br>
<div class="im">cpuid: Module examples compile (examples_compile): FAIL (+1/2)<br>
</div>/tmp/user/1000/ccanlint-24617.1804289383/example-_info-cpuid.c:Standalone example:<br>
#line 10 "/home/rusty/devel/cvs/ccan/ccan/cpuid/_info"<br>
#include <ccan/cpuid/cpuid.h><br>
#include <stdio.h><br>
<br>
int main(void)<br>
{<br>
     uint32_t highest;<br>
     cpuid(CPU_HIGHEST_EXTENDED_FUNCTION_SUPPORTED, &highest);<br>
     printf ("Highest extended function supported: %d\n", highest);<br>
<br>
     return 0;<br>
}<br>
<br>
Errors: /home/rusty/devel/cvs/ccan/ccan/cpuid/_info: In function ‘main’:<br>
/home/rusty/devel/cvs/ccan/ccan/cpuid/_info:16:12: error: ‘CPU_HIGHEST_EXTENDED_FUNCTION_SUPPORTED’ undeclared (first use in this function)<br>
/home/rusty/devel/cvs/ccan/ccan/cpuid/_info:16:12: note: each undeclared identifier is reported only once for each function it appears in<br>
<br>
<br>
Adding headers, wrappers:<br>
/* Include header from module. */<br>
#include <ccan/cpuid/cpuid.h><br>
/* Prepend a heap of headers. */<br>
#include <assert.h><br>
#include <err.h><br>
#include <errno.h><br>
#include <fcntl.h><br>
#include <limits.h><br>
#include <stdbool.h><br>
#include <stdint.h><br>
#include <stdio.h><br>
#include <stdlib.h><br>
#include <string.h><br>
#include <sys/stat.h><br>
#include <sys/types.h><br>
#include <unistd.h><br>
/* Useful dummy functions. */<br>
extern int somefunc(void);<br>
int somefunc(void) { return 0; }<br>
extern char somestring[];<br>
char somestring[] = "hello world";<br>
/* The example starts with #include, so didn't wrap in main() */<br>
#line 10 "/home/rusty/devel/cvs/ccan/ccan/cpuid/_info"<br>
#include <ccan/cpuid/cpuid.h><br>
#include <stdio.h><br>
<br>
int main(void)<br>
{<br>
     uint32_t highest;<br>
     cpuid(CPU_HIGHEST_EXTENDED_FUNCTION_SUPPORTED, &highest);<br>
     printf ("Highest extended function supported: %d\n", highest);<br>
<br>
     return 0;<br>
}<br>
<br>
Errors: /home/rusty/devel/cvs/ccan/ccan/cpuid/_info: In function ‘main’:<br>
/home/rusty/devel/cvs/ccan/ccan/cpuid/_info:16:12: error: ‘CPU_HIGHEST_EXTENDED_FUNCTION_SUPPORTED’ undeclared (first use in this function)<br>
/home/rusty/devel/cvs/ccan/ccan/cpuid/_info:16:12: note: each undeclared identifier is reported only once for each function it appears in<br>
<br>
<br>
<br>
cpuid: Total score: 7/9<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> Anyway, I'll compile ccanlint and use that one instead.<br>
><br>
> Thanks,<br>
> Ahmed<br>
><br>
><br>
> On Tue, Nov 12, 2013 at 12:44 PM, Rusty Russell <<a href="mailto:rusty@rustcorp.com.au">rusty@rustcorp.com.au</a>>wrote:<br>
><br>
>> Hi Ahmed,<br>
>><br>
>>         You broke ccan/cpuid *again*:<br>
>><br>
>> rusty@rusty-ThinkPad-X201:~/devel/cvs/ccan (7cc2462...)$ ccanlint<br>
>> ccan/cpuid<br>
>> cpuid: Module examples compile (examples_compile): FAIL (+1/2)<br>
>> /tmp/user/1000/ccanlint-15606.1804289383/example-_info-cpuid.c:Standalone<br>
>> compile and adding headers both failed<br>
>> cpuid: Total score: 32/42<br>
>><br>
>> I suggest you build ccanlint, and run it before checkin!<br>
>><br>
>> Thanks,<br>
>> Rusty.<br>
>><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<font face="courier new, monospace">Ahmed, C/C++/Assembly/Lua Developer | Open Source Hacker<br></font><font face="courier new, monospace"><a href="https://github.com/decltype/" target="_blank">https://github.com/decltype/</a> | <a href="mailto:f.fallen45@gmail.com" target="_blank">f.fallen45@gmail.com</a></font></blockquote>
</div>
</div>