COMPILER WARNING MESSAGES
Compiler Warning Messages
#error/warning
Assignment inside relational expression
Although legal it is a common error to do something like if(a=b) when it was intended to do
if(a==b).
Assignment to enum is not of the correct type.
This warning indicates there may be such a typo in this line:
Assignment to enum is not of the correct type
If a variable is declared as a ENUM it is best to assign to the variables only elements of the
enum. For example:
enum colors {RED,GREEN,BLUE} color;
...
color = GREEN;
color = 1;
// OK
// Warning 209
color = (colors)1;
//OK
Code has no effect
The compiler can not discern any effect this source code could have on the generated code.
Some examples:
1;
a==b;
1,2,3;
Condition always FALSE
This error when it has been determined at compile time that a relational expression will never be
true. For example:
int x;
if( x>>9 )
Condition always TRUE
This error when it has been determined at compile time that a relational expression will never be
false. For example:
#define PIN_A1 41
...
if( PIN_A1 )
// Intended was: if( input(PIN_A1) )
Function not void and does not return a value
Functions that are declared as returning a value should have a return statement with a value to
be returned. Be aware that in C only functions declared VOID are not intended to return a value.
If nothing is specified as a function return value "int" is assumed.
Duplicate #define
The identifier in the #define has already been used in a previous #define. To redefine an
identifier use #UNDEF first. To prevent defines that may be included from multiple source do
something like:
#ifndef
ID
#define ID text
#endif
Feature not supported
323
相关PDF资料
PCI-EXP-T42G5-N1 IP CORE PCI EXPRESS ORCA 4
PCM18XH2 PROCESSOR MODULE MPLAB-ICE 2000
PCM18XN0 PROCESSOR MODULE FOR ICE2000
PDA-B-24-615-E-2B1-1-C CIRCUIT BREAKER MAG 1P 15A
PFMF.260.2 PFMF PTC FUSE SMT 2.6A 1812
PFNF.200.2 PFNF PTC FUSE SMT 2A 1206
PFRY.375 PTC-FUSE RADIAL 72 VDC
PFSM.150.33.2 FUSE PTC 8A 15V FST-TRIP SMD
相关代理商/技术参数
PCD_09 制造商:MACOM 制造商全称:Tyco Electronics 功能描述:Low Profile PCB Relay PCD
PCD-00173-0C 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00173-0E 制造商:Molex 功能描述:Ethernet Cable Assembly
PCD-00173-0H 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00173-0K 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00174-0C 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY; Cable Length - Imperial:3ft; Cable Length - Metric:914.4mm; Connector Type A:RJ45 Plug; Connector Type B:RJ45 Plug; Jacket Color:Red; Approval Bodies:CSA / UL; Body Material:PVC; Cable Assembly Type:Ethernet ;RoHS Compliant: NA
PCD-00174-0E 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY; Cable Length - Imperial:3ft; Cable Length - Metric:914.4mm; Connector Type A:RJ45 Plug; Connector Type B:RJ45 Plug; Jacket Color:Grey; Approval Bodies:CSA / UL; Body Material:PVC; Cable Assembly Type:Ethernet;RoHS Compliant: NA
PCD-00174-0H 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY