Error 18 Symbol Redeclared
main() 6 { 7 return count(deans_list); 8 } @module count.c 1 #include "grad.h" 2 String deans_list[100]; 3 int count( String *list ) 4 { 5 int sum = 0; 6 int i; 7 for( i = 0; list[i]; i++ ) 8 ++sum; 9 return sum; 10 } @header grad.h 1 //lint -u program not complete 2 typedef char *String; This multi-module program is intended to count the number of students that made the dean's list in this spring's graduation but something is going horribly wrong. Note: it is given that the last student's name is followed by the traditional NULL. bug18.mm lint Output === Multiple Modules: bug18.mm --- Module: graduation.c (C) --- Wrap-up for Module: graduation.c Info 752: local declarator 'graduates' (line 2, file graduation.c) not referenced --- Module: count.c (C) _ String deans_list[100]; count.c 3 Error 18: Symbol 'deans_list' redeclared (basic) conflicts with line 3, file graduation.c _ } count.c 11 Info 818: Pointer parameter 'list' (line 4) could be declared as pointing to const Reference Manual Explanation 18 Symbol 'Symbol' redeclared (TypeDiff) conflicts with Location -- A symbol is being redeclared. The parameter TypeDiff provides further information on how the types differ. Location is the location of the previous definition. If you have comments or questions about this bug, please post them to our Discussion Forum Previous Bug - Bug #845 - May 2010 Use our Interactive Demo to Run FlexeLint on our Bugs of the Month PC-lint/FlexeLint - Product Overview Home | Contact | Order PC-lint and FlexeLint are trademarks of Gimpel Software Copyright © 2010, Gimpel Software, All rights reserved.
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up lint error 18 http://www.gimpel.com/html/newbugs/bug18.htm "Symbol 'CsiNetInit(void)' redeclared (precision) conflicts with line 21 up vote 0 down vote favorite Can any please explain in which scenarios will we get these errors? I have a following code and lint is showing following error: #ifdef SIC_CSI_NET short CsiNetInit(void); #endif Error: "Symbol 'CsiNetInit(void)' redeclared (precision) conflicts with line 21 There is nothing in line 21 I can see a ** which is used http://stackoverflow.com/questions/10450361/lint-error-18-symbol-csinetinitvoid-redeclared-precision-conflicts-with-l for comment. c lint share|improve this question edited May 4 '12 at 14:17 Jonathan Leffler 438k61509822 asked May 4 '12 at 14:00 user954299 75312 6 Instead of our imagining scenarios, why not show us line 21? –Scott Hunter May 4 '12 at 14:02 add a comment| 2 Answers 2 active oldest votes up vote 2 down vote Probably, in one of the compilation units processing these lines, SIC_CSI_NET is not defined, in contrast to the file provoking this warning, but the function is used. In that case, Lint doesn't see a prototype at all, brings a different warning (probably 718 "Symbol 'CsiNetInit' undeclared, assumed to return int"), and assumes a prototype int CsiNetInit(void);. When it then sees the actual prototype, the difference becomes obvious: int vs. short. share|improve this answer answered Nov 29 '12 at 13:58 Johan Bezem 1,74111038 add a comment| up vote 0 down vote Look at the actual definition of CsiNetInit(); perhaps its prototype specifies a different return type than short? share|improve this answer edited May 4 '12 at 14:15 Jonathan Leffler 438k61509822 answered May 4 '12 at 14:14 unwind 254k38331460 add a comment| Your Answer draft sav
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings http://stackoverflow.com/questions/7529602/pc-lint-error-714 and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation https://sourceforge.net/p/tcnopen/trdp/441/tree/trunk/trdp/test/lint/_LINT.TMP Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it error 18 only takes a minute: Sign up PC Lint error 714 up vote 2 down vote favorite In my CRC8.c I have this function: BOOL isCRCValid(const UINT8 *ptr, UINT8 Len, UINT8 CRCChar){ return CRCChar == generateCRC(ptr, Len); //generareCRC returns a UINT8 } It's is declared in CRC8.h, but PC Lint returns me the following. Info 714: Symbol 'isCRCValid(const unsigned char *, error 18 symbol unsigned char, unsigned char)' not referenced Info 830: Location cited in prior message Help says 714 is: 714: Symbol 'Symbol' (Location) not referenced -- The named external variable or external function was defined but not referenced. This message is suppressed for unit checkout (-u option). and 830 is: 830 Location cited in prior message -- Message 830 is a vehicle to convey in 'canonical form' the location information embedded within some other message. For example, consider the (somewhat simplified) message: file x.c line 37: Declaration for 'x' conflicts with line 22 This contains the location ("line 22") embedded in the text of the message. Embedded location information is not normally understood by editors and IDE's (Interactive Development Environments) which can only position to the nominal location (line 37 in this example). By adding this additional message with the nominal location of line 22 the user can, by stepping to the next message and, in this case, see what the 'conflict' is all about. This message and message 831 below do not follow the ordinary rules for message suppres
IEC61375 standardised communication Brought to you by: ahweiss, bloehr Summary Files Reviews Support Tickets Code Browse Commits [r441]: trunk / trdp / test / lint / _LINT.TMP Maximize Restore History Download this file 243 lines (228 with data), 14.0 kB --- Module: D:\TCNOpen\trunk\trdp\src\common\trdp_if.c _ UINT8 data[0]; /**< data ready to be sent (with CRCs) */ D:\TCNOpen\trunk\trdp\src\common\trdp_private.h(283) : Error 43: Vacuous type for variable 'MD_ELE::data' _ iterPD->privFlags &= ~TRDP_REDUNDANT; D:\TCNOpen\trunk\trdp\src\common\trdp_if.c(730) : Error 64: Type mismatch (assignment) (int/enum) _ appHandle->realIP); D:\TCNOpen\trunk\trdp\src\common\trdp_if.c(1870) : Warning 534: Ignoring return value of function 'vos_sockJoinMC(int, unsigned int, unsigned int)' (compare with line 253, file D:\TCNOpen\trunk\trdp\src\vos\api\vos_sock.h) --- Module: D:\TCNOpen\trunk\trdp\src\common\trdp_mdcom.c _ UINT8 data[0]; /**< data ready to be sent (with CRCs) */ D:\TCNOpen\trunk\trdp\src\common\trdp_private.h(283) : Error 43: Vacuous type for variable 'MD_ELE::data' _ appHandle->iface[sockPosition].usage++; D:\TCNOpen\trunk\trdp\src\common\trdp_mdcom.c(626) : Warning 644: Variable 'sockPosition' (line 399) may not have been initialized _ vos_sockClose(appHandle->iface[index].sock); D:\TCNOpen\trunk\trdp\src\common\trdp_mdcom.c(1370) : Warning 534: Ignoring return value of function 'vos_sockClose(int)' (compare with line 220, file D:\TCNOpen\trunk\trdp\src\vos\api\vos_sock.h, module D:\TCNOpen\trunk\trdp\src\common\trdp_if.c) _ vos_sockClose(appHandle->iface[index].sock); D:\TCNOpen\trunk\trdp\src\common\trdp_mdcom.c(2068) : Warning 534: Ignoring return value of function 'vos_sockClose(int)' (compare with line 220, file D:\TCNOpen\trunk\trdp\src\vos\api\vos_sock.h, module D:\TCNOpen\trunk\trdp\src\common\trdp_if.c) --- Module: D:\TCNOpen\trunk\trdp\src\common\trdp_pdcom.c _ UINT8 data[0]; /**< data ready to be sent (with CRCs) */ D:\TCNOpen\trunk\trdp\src\common\trdp_pri