提交 1de4db94 编写于 作者: Y Yifan Hao

Switch from const int to macro for array length

Looks like Jenkins compiler is not happy with variable length
static array...

* Testing
Local compile pass

>gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.29.3)
Target: x86_64-apple-darwin21.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

./taosdemo for sanity check
上级 5dc2a671
......@@ -683,7 +683,7 @@ int tsdbScanAndTryFixDFileSet(STsdbRepo *pRepo, SDFileSet *pSet) {
}
int tsdbParseDFilename(const char *fname, int *vid, int *fid, TSDB_FILE_T *ftype, uint32_t *_version) {
static const int MAX_SUFFIX_LEN = 10;
#define MAX_SUFFIX_LEN 10
char suffix[MAX_SUFFIX_LEN] = {0};
*_version = 0;
*ftype = TSDB_FILE_MAX;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册