Merge pull request #18819 from taosdata/enh/insertOptimize_wxy

fix: compile warn
This commit is contained in:
Xiaoyu Wang 2022-12-08 17:54:13 +08:00 committed by GitHub
commit d146769b19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -500,8 +500,9 @@ int32_t taosCloseDir(TdDirPtr *ppDir) {
void taosGetCwd(char *buf, int32_t len) {
#if !defined(WINDOWS)
(void)getcwd(buf, len - 1);
char *unused __attribute__((unused));
unused = getcwd(buf, len - 1);
#else
strncpy(buf, "not implemented on windows", len -1);
strncpy(buf, "not implemented on windows", len - 1);
#endif
}