C Compiler Warning Abstract
ÔÚ´Ëժ¼C±àÒëʱ³öÏֵľ¯¸æÐÅÏ¢µÄÒâÒå¡£
1) warning: ISO C90 forbids mixed declarations and code
CÓïÑÔÊÇÃæÏò¹ý³ÌµÄÓïÑÔ£¬Õâ¸ö¾¯¸æͨ³£±íʾÉùÃ÷Ó¦¸ÃÔÚÆäËû´úÂëµÄÇ°Ãæ¡£
2) warning: initialization from incompatible pointer type
ÔÚLinux kernelÖÐÓÐÐí¶àcallbackº¯Êý£¬Õâ¸ö¾¯¸æ±íÃ÷callbackº¯ÊýµÄʵÏÖÖУ¬»òÕß·µ»ØÀàÐÍ£¬»òÕß²ÎÊý¸öÊýÀàÐÍÓëÔÏȶ¨ÒåµÄ²»Ò»Ö¡£
3) warning: unused variable 'socdev'
ÔÚ±¾º¯ÊýÖÐÉùÃ÷µÄ±äÁ¿Î´±»Ê¹Óá£
4) warning: '**_read' defined but not used
Ä£¿éÖеĺ¯Êý±»¶¨ÒåÁË£¬µ«ÊÇδ±»Ê¹Óá£
5) warning: passing argument 1 of 'bus_to_virt' makes integer from pointer without a cast
º¯ÊýµÄ1ºÅ²ÎÊýÖе÷ÓÃbus_to_virt£¬ÐèÒªÕûÐÍÊý¾Ý£¬¶øµ±Ç°ÊÇÖ¸ÕëÀàÐÍ£¬±ØÐë¾¹ýÇ¿ÖÆת»»¡£
6) warning: passing argument 2 of 'set_dma_irq_handler' from incompatible pointer type
º¯Êýset_dma_irq_handlerµÄ²ÎÊýÀàÐÍÓëÉùÃ÷µÄ²»Ò»Ö¡£
Ïà¹ØÎĵµ£º
ÎÄÕÂÀ´×Ô£ºhttp://mayer.vokaa.com/archives/16
¶ÔÓÚÒ»¸öÇ°¶Ë¹¤×÷Õߣ¬¶¼ÖªµÀ·ûºÏW3C¹æ·¶¶ÔÓÚÍøÒ³µÄ¿çä¯ÀÀÆ÷¹¤×÷´øÀ´ºÃ´¦£¬²¢ÄÜʹÍøÒ³ÔÚ²»Í¬µÄä¯ÀÀÆ÷Ö®¼ä»¥Ïà¼æÈÝ¡£
ÔÚÕâÀïÎÒÃÇÒ»Ò»Áоٻ¥ÁªÍøÉÏËùÌṩµÄ½â¾ö°ì·¨¼°Ò»Ð©ÎÒ¸öÈ˵Ľ¨Ò鼰ʵ¼ù°¸Àý¡£
Æäʵ£¬ÏÖÔÚ¶àÊýÈ˶¼»áʹÓÃHackµÄ·½·¨½â¾ö£¬µ«Èç¹ûDIVºÍCSSµÄ½á¹¹ÇåÎú¡¢ºÏÀí£ ......
¿ìËÙÃÝÈ¡Ä£ÀíÂÛ»ù´¡£º ¼ÆËã a^b mod c ?
ÓÉ(a x b) mod c=((a mod c) x b) mod c.
ÎÒÃÇ¿ÉÒÔ½« bÏȱíʾ³É¾Í£º
b=at2^t+at-1 2^t-1+……a02^0. (ai=[0,1]).
ÕâÑùÎÒÃÇÓÉ a^b mod c=(a^(at2^t+at-12^t-1+…a02^0)mod c.
È»¶øÎÒÃÇÇó a^(2^(i+1)) ......
http://west263.com/info/html/chengxusheji/C-C--/20080224/9240.html
1. gcnew·µ»ØµÄÊǸö¾ä±ú(Handle)£¬¶ønew·µ»ØµÄÊÇʵ¼ÊµÄÄÚ´æµØÖ·.
¡¡¡¡2. gcnew´´½¨µÄ¶ÔÏóÓÉÐéÄâ»úÍйܣ¬¶ønew´´½¨µÄ¶ÔÏó±ØÐë×Ô¼ºÀ´¹ÜÀíºÍÊÍ·Å.
¡¡¡¡µ±È»£¬´Ó³ÌʽԱµÄ½Ç¶ÈÀ´Ëµ£¬¹ÜËûÊǾä±ú»¹ÊÇʲôÆäËûµÄ¶«Î÷£¬×ÜÅܲ»µôÊǶÔij¿éÄÚ´æµØÖ·µÄÒýÓã¬Êµ¼Ê ......
enumÀàÐ͵ijÉÔ±£¬Ä¬ÈÏÇé¿öÏÂÊÇ´Ó0¿ªÊ¼¸³Öµ£»
Èç¹ûÖмäij¸ö³ÉÔ±½øÐÐÁËÊÖ¶¯¸³ÖµµÄ»°£¬¸Ã³ÉÔ±µÄÏÂÒ»¸ö³ÉÔ±µÄֵΪ¸Ã³ÉÔ±µÄÖµ+1
#include <stdio.h>
typedef enum {
PLAYMODE = 1, // ĬÈÏ´Ó0¿ªÊ¼
PAUSEMODE,
STOPMODE = 5,
TRACKRPTMODE,
MIXMODE
}Status_t;
int main()
{
int n = 4;
sw ......
http://www.edn.com/article/457428-Can_C_beat_RTL_.php
With the appearance of higher speeds and more DSP macrocells in low-cost FPGAs, more and more design teams are seeing the configurable chips not as glue but as a way to accelerate the inner loops of numerical algorithms, either in conjun ......