thank you for your reply i noticed that i get the remark "controlling expression is constant" every time i use a macro like : "mcbsp_ut.c", line 16: remark #238-D: MCBSP_TX_RESET(DLB_TST__SER_CHAN_NUM); // Reset Tx channel is there a cleaner way of doing a constant assignment like for exam : #define RESET_PORT(PORT_ADD) (*PORT_ADD |= 0x1) -----Original Message----- From: C.W. [mailto:] Sent: Wednesday, July 17, 2002 8:13 PM To: Meidad Raz Subject: RE: [c6x] RE: C6000: C/C++ Compiler Diagnostic Messages At 09:27 AM 7/17/2002 +0200, you wrote: >yes , i'm looking for more information about these messages , in order to >better understand what make the compiler generete them. >I'm especialy talking about the warning and the remarks he generate, since >most of the error are more easy to solve and understand. > >for example: Well, first, you have remarks turned on, so you'll get messages that really are remarks...like "I noticed that the controlling expression is a constant", below. These are just unusual items the compiler is remarking about. They may or may not be a real issue, but are often signs of places where the code can be improved. >1) "vtrb_if.c", line 180: remark #238-D: controlling expression is constant > for(i=0;i<(VIT_IF__TX_BUF_SIZE*8)-3;i+=6) Well, I cannot tell for sure without looking at other parts of your program, but the compiler thinks the expression i<(VIT_IF__TX_BUF_SIZE*8)-3 is constant, i.e. unchanging, i.e. will always give the same answer to matter what your program does, and this is unusual because why are you bothering to test something that cannot change. This is the same as if you said "if (1<2) ...", which is a constant controlling expression, as 1 is always less than 2. Preprocess the source file (-ppo) and look at that line and see what it says. >2) "vtrb_if.c", line 166: remark #225-D: function declared implicitly > vit_enc__encode(Cfg); No prototype; the function is declared implicitly with default types rather than with an explicit declaration by the developer. It's parameters might not be passed correctly. Add a declaration that is in scope at line 166. -W |