This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center。
6年前关闭。
这里“format_SaNameT”显示警告
6年前关闭。
void format_SaNameT( const char* const name, SaNameT* formatted )
{
if( ! name || ! formatted ) return;
memset( formatted, 0, sizeof( SaNameT ) );
formatted->length = strlen( name );
strncpy( formatted->value, name, SA_MAX_NAME_LENGTH );
}
这里“format_SaNameT”显示警告
最佳答案
您应该在头文件中提供一个原型,以便编译器知道它在处理什么。。。
在不同的void format_SaNameT(const char* const, SaNameT*);
文件或主文件中声明.h
,警告将消失。
关于c - 警告:'format_SaNameT'先前没有原型(prototype),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/15703863/
10-11 18:49