mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-29 18:48:09 +08:00
improve api doc lint
This commit is contained in:
parent
c5b26de938
commit
19b067030e
@ -4,6 +4,7 @@
|
||||
* 修复启动时 widget\_is\_keyboard 和 widget\_is\_normal\_window 的判空警告, 使用了 free 且未置空的指针(感谢高源提供补丁)。
|
||||
* 修复在 lcd_mem 模式下,创建离线画布影响全局LCD宽高问题(感谢高源提供补丁)。
|
||||
* 补全svg_image离线画布创建时的编码格式(感谢高源提供补丁)。
|
||||
* 完善 api\_doc\_lint VS2023编译问题(感谢俊圣提供补丁)。
|
||||
|
||||
2023/05/04
|
||||
* 完善tk\_object\_to\_json对不同数据类型和数组的处理。
|
||||
|
@ -57,10 +57,10 @@ static const char* errs[] = {
|
||||
"(829): error: nothing can be written between @param\n",
|
||||
"(934): error: unknown annotation \"string1\"\n",
|
||||
"(940): error: @const name invalid CODE_EDIT_PROP_LANG1 -- CODE_EDIT_PROP_LANG\n",
|
||||
"(1096): error: @prefix name missing\n"};
|
||||
"(1098): error: @prefix name missing\n"};
|
||||
|
||||
static const char* warns[] = {
|
||||
"(1076): warning: @prefix missing\n",
|
||||
"(1078): warning: @prefix missing\n",
|
||||
};
|
||||
|
||||
void dummy_log(void* ctx, log_level_t level, const char* s) {
|
||||
|
@ -628,7 +628,7 @@ static const char *keywordString (const keywordId keyword)
|
||||
return name;
|
||||
}
|
||||
|
||||
static void __unused__ pt (tokenInfo *const token)
|
||||
static void pt (tokenInfo *const token)
|
||||
{
|
||||
if (isType (token, TOKEN_NAME))
|
||||
printf ("type: %-12s: %-13s line: %lu\n",
|
||||
@ -643,7 +643,7 @@ static void __unused__ pt (tokenInfo *const token)
|
||||
tokenString (token->type), token->lineNumber);
|
||||
}
|
||||
|
||||
static void __unused__ ps (statementInfo *const st)
|
||||
static void ps (statementInfo *const st)
|
||||
{
|
||||
unsigned int i;
|
||||
printf ("scope: %s decl: %s gotName: %s gotParenName: %s\n",
|
||||
|
@ -37,7 +37,6 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* MACROS
|
||||
*/
|
||||
@ -53,14 +52,9 @@
|
||||
# define HAVE_REGEX 1
|
||||
#endif
|
||||
|
||||
/* This is a helpful internal feature of later versions (> 2.7) of GCC
|
||||
* to prevent warnings about unused variables.
|
||||
*/
|
||||
#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) && !(defined (__APPLE_CC__) || defined (__GNUG__))
|
||||
# define __unused__ __attribute__((unused))
|
||||
# define __printf__(s,f) __attribute__((format (printf, s, f)))
|
||||
#else
|
||||
# define __unused__
|
||||
# define __printf__(s,f)
|
||||
#endif
|
||||
|
||||
|
@ -530,11 +530,11 @@ extern void findRegexTags (void)
|
||||
#endif /* HAVE_REGEX */
|
||||
|
||||
extern void addTagRegex (
|
||||
const langType language __unused__,
|
||||
const char* const regex __unused__,
|
||||
const char* const name __unused__,
|
||||
const char* const kinds __unused__,
|
||||
const char* const flags __unused__)
|
||||
const langType language ,
|
||||
const char* const regex ,
|
||||
const char* const name ,
|
||||
const char* const kinds ,
|
||||
const char* const flags )
|
||||
{
|
||||
#ifdef HAVE_REGEX
|
||||
Assert (regex != NULL);
|
||||
@ -556,10 +556,10 @@ extern void addTagRegex (
|
||||
}
|
||||
|
||||
extern void addCallbackRegex (
|
||||
const langType language __unused__,
|
||||
const char* const regex __unused__,
|
||||
const char* const flags __unused__,
|
||||
const regexCallback callback __unused__)
|
||||
const langType language ,
|
||||
const char* const regex ,
|
||||
const char* const flags ,
|
||||
const regexCallback callback )
|
||||
{
|
||||
#ifdef HAVE_REGEX
|
||||
Assert (regex != NULL);
|
||||
@ -573,7 +573,7 @@ extern void addCallbackRegex (
|
||||
}
|
||||
|
||||
extern void addLanguageRegex (
|
||||
const langType language __unused__, const char* const regex __unused__)
|
||||
const langType language , const char* const regex )
|
||||
{
|
||||
#ifdef HAVE_REGEX
|
||||
if (! regexBroken)
|
||||
@ -594,7 +594,7 @@ extern void addLanguageRegex (
|
||||
*/
|
||||
|
||||
extern boolean processRegexOption (const char *const option,
|
||||
const char *const parameter __unused__)
|
||||
const char *const parameter )
|
||||
{
|
||||
boolean handled = FALSE;
|
||||
const char* const dash = strchr (option, '-');
|
||||
@ -616,7 +616,7 @@ extern boolean processRegexOption (const char *const option,
|
||||
return handled;
|
||||
}
|
||||
|
||||
extern void disableRegexKinds (const langType language __unused__)
|
||||
extern void disableRegexKinds (const langType language )
|
||||
{
|
||||
#ifdef HAVE_REGEX
|
||||
if (language <= SetUpper && Sets [language].count > 0)
|
||||
@ -631,8 +631,8 @@ extern void disableRegexKinds (const langType language __unused__)
|
||||
}
|
||||
|
||||
extern boolean enableRegexKind (
|
||||
const langType language __unused__,
|
||||
const int kind __unused__, const boolean mode __unused__)
|
||||
const langType language ,
|
||||
const int kind , const boolean mode )
|
||||
{
|
||||
boolean result = FALSE;
|
||||
#ifdef HAVE_REGEX
|
||||
@ -652,7 +652,7 @@ extern boolean enableRegexKind (
|
||||
return result;
|
||||
}
|
||||
|
||||
extern void printRegexKinds (const langType language __unused__, boolean indent)
|
||||
extern void printRegexKinds (const langType language , boolean indent)
|
||||
{
|
||||
#ifdef HAVE_REGEX
|
||||
if (language <= SetUpper && Sets [language].count > 0)
|
||||
|
@ -736,7 +736,7 @@ static void processEtagsInclude (
|
||||
}
|
||||
|
||||
static void processExcludeOption (
|
||||
const char *const option __unused__, const char *const parameter)
|
||||
const char *const option , const char *const parameter)
|
||||
{
|
||||
const char *const fileName = parameter + 1;
|
||||
if (parameter [0] == '\0')
|
||||
@ -873,7 +873,7 @@ static void processFieldsOption (
|
||||
}
|
||||
|
||||
static void processFilterTerminatorOption (
|
||||
const char *const option __unused__, const char *const parameter)
|
||||
const char *const option , const char *const parameter)
|
||||
{
|
||||
freeString (&Option.filterTerminator);
|
||||
Option.filterTerminator = stringCopy (parameter);
|
||||
@ -935,8 +935,8 @@ static void printProgramIdentification (void)
|
||||
}
|
||||
|
||||
static void processHelpOption (
|
||||
const char *const option __unused__,
|
||||
const char *const parameter __unused__)
|
||||
const char *const option ,
|
||||
const char *const parameter )
|
||||
{
|
||||
printProgramIdentification ();
|
||||
putchar ('\n');
|
||||
@ -1144,8 +1144,8 @@ static void processLanguagesOption (
|
||||
}
|
||||
|
||||
static void processLicenseOption (
|
||||
const char *const option __unused__,
|
||||
const char *const parameter __unused__)
|
||||
const char *const option ,
|
||||
const char *const parameter )
|
||||
{
|
||||
printProgramIdentification ();
|
||||
puts ("");
|
||||
@ -1171,8 +1171,8 @@ static void processListKindsOption (
|
||||
}
|
||||
|
||||
static void processListMapsOption (
|
||||
const char *const __unused__ option,
|
||||
const char *const __unused__ parameter)
|
||||
const char *const option,
|
||||
const char *const parameter)
|
||||
{
|
||||
if (parameter [0] == '\0' || strcasecmp (parameter, "all") == 0)
|
||||
printLanguageMaps (LANG_AUTO);
|
||||
@ -1188,8 +1188,8 @@ static void processListMapsOption (
|
||||
}
|
||||
|
||||
static void processListLanguagesOption (
|
||||
const char *const option __unused__,
|
||||
const char *const parameter __unused__)
|
||||
const char *const option ,
|
||||
const char *const parameter )
|
||||
{
|
||||
printLanguageList ();
|
||||
exit (0);
|
||||
@ -1363,8 +1363,8 @@ static void processIgnoreOption (const char *const list)
|
||||
}
|
||||
|
||||
static void processVersionOption (
|
||||
const char *const option __unused__,
|
||||
const char *const parameter __unused__)
|
||||
const char *const option ,
|
||||
const char *const parameter )
|
||||
{
|
||||
printProgramIdentification ();
|
||||
exit (0);
|
||||
|
@ -383,7 +383,7 @@ extern void freeParserResources (void)
|
||||
*/
|
||||
|
||||
extern void processLanguageDefineOption (
|
||||
const char *const option, const char *const parameter __unused__)
|
||||
const char *const option, const char *const parameter )
|
||||
{
|
||||
#ifdef HAVE_REGEX
|
||||
if (parameter [0] == '\0')
|
||||
|
@ -504,7 +504,7 @@ static boolean isPathSeparator (const int c)
|
||||
|
||||
#if ! defined (HAVE_STAT_ST_INO)
|
||||
|
||||
static void canonicalizePath (char *const path __unused__)
|
||||
static void canonicalizePath (char *const path)
|
||||
{
|
||||
#if defined (MSDOS_STYLE_PATH)
|
||||
char *p;
|
||||
|
Loading…
Reference in New Issue
Block a user