2021-07-20warning: no previous prototype for function ‘SystemInit‘ [-Wmissing-prototypes]

  • Post author:
  • Post category:其他


#include "stm32f10x.h"

void SystemInit()
{
	
}

int main()
{
	
}

错误展示:


Rebuild started: Project: led



*** Using Compiler ‘V6.15’, folder: ‘C:\Keil_v5\ARM\ARMCLANG\Bin’



Rebuild target ‘Target 1’



main.c(5): warning:


no previous prototype for function ‘SystemInit


‘ [-Wmissing-prototypes]



void SystemInit(void)



^



main.c(5): note: declare ‘static’ if the function is not intended to be used outside of this translation unit



void SystemInit(void)



^



static



1 warning generated.



compiling main.c…



assembling startup_stm32f10x_hd.s…



linking…



Program Size: Code=324 RO-data=320 RW-data=0 ZI-data=1632



“.\Objects\led.axf” – 0 Error(s), 1 Warning(s).



Build Time Elapsed: 00:00:00

SystemInit函数是startup启动文件中的,经过百度,有警告,可能又和什么版本乱七八糟的有关吧

解决方法:点击魔术棒,选择5,有警告的时候默认是6

再次编译就没了



版权声明:本文为m0_48203614原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。