Hi,
I am trying to compile a c file and running into the following error
OBJECT ATSGCHNAAAlibs/qcom_htc.o "../../wlan/oem/ath/targaddrs_rexos.h", line 44: Warning: #1295-D: Deprecated declaration config_exit - give arg types void config_exit(); ^ "..\..\wlan\oem\qcom_htc.c", line 8000: Warning: #1-D: last line of file ends without a newline QSR_MSG_HIGH( 3772747615ll, "WLAN FC:WLAN registered with FC", 0, 0, 0);//auto-gen, ^ "..\..\wlan\oem\qcom_htc.c", line 7967: Error: #37: the #endif for this directive is missing ..\..\wlan\oem\qcom_htc.c: 2 warnings, 1 error make[1]: *** [ATSGCHNAAAlibs/qcom_htc.o] Error 1 make: *** [libs] Error 2
Can someone pls help what went wrong?
Thanks in advance
-Gopi
"Can someone pls help what went wrong?"
The compiler is telling you precisely what has gone wrong - just read the messages literally:
"../../wlan/oem/ath/targaddrs_rexos.h", line 44: Warning: #1295-D: Deprecated declaration config_exit - give arg types void config_exit();
It's telling you that the message refers to line 44 in the file targaddrs_rexos.h; "arg" here is short for "argument", so the compiler is telling you to give the argument types for the function config_exit.
last line of file ends without a newline
Obvious?
the #endif for this directive is missing
The above warning can be ignored.
I am more worried about the below error
"..\..\wlan\oem\qcom_htc.c", line 7967: Error: #37: the #endif for this directive is missing ..\..\wlan\oem\qcom_htc.c: 2 warnings, 1 error make[1]: *** [ATSGCHNAAAlibs/qcom_htc.o] Error 1
Why is the #endif missing even though the last of the file ends with a new line?
Thanks
When the compiler says that the #endif is missing, you normally have more #if/#ifdef than you have #endif. Pair each open/close token and see if you can find a mismatch.
Already did that,It's definetely not because of having more #ifdef's than #endifs or vice-versa.
I see the exact number of #ifdef's and #endif's
the line 8000 where it is complaning looks like
QSR_MSG_HIGH( 3772747615ll, "WLAN FC:WLAN registered with FC", 0, 0, 0);//auto-gen, to change remove 'QSR_' and first param
Does the comment at the end is blocking from the #endif being detected?
Line 8000 just has a warning. Add a newline at the end of the line and the warning will go away.
But it is the other line that we are discussing.
View all questions in Keil forum