Warning: implicit declaration of function 'fmc_erase' is invalid in C99
时间: 2024-01-07 18:39:01 浏览: 108
引用\[1\]:告警类型:warning: implicit declaration of function 'gets' is invalid in C99 \[-Wimplicit-function-declaration\]。引用\[2\]:函数“gets”的隐式声明在C99中无效。引用\[3\]:如果只声明函数而没有定义函数(函数的具体实现部分),那么就会直接报错:Error: L6218E: Undefined symbol function“XXX” (referred from main.o)!如果没有声明,但是已经定义了函数,只是会出现警告:Warning: #223-D: function “XXX” declared implicitly!。
问题:Warning: implicit declaration of function 'fmc_erase' is invalid in C99
回答: 这个警告是在C99标准中隐式声明函数'fmc_erase'无效导致的。在C99标准中,如果只声明函数而没有定义函数,会直接报错。如果没有声明但已经定义了函数,只会出现警告。所以,为了避免这个警告,你需要在代码中显式地声明函数'fmc_erase'。
#### 引用[.reference_title]
- *1* *2* [warning: implicit declaration of function ‘gets‘ is invalid in C99 [-Wimplicit-function-...](https://blog.csdn.net/qq_50635297/article/details/128265518)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [关于Warning:Implicit declaration of function “xxx” is invalid in C99警告!](https://blog.csdn.net/family20102010/article/details/126155338)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文