浏览代码

TestDriver: Fix -Wstrict-overflow for GCC 7 and earlier

Fixes: #13955
Nikita Nemkin 8 月之前
父节点
当前提交
f9551f8bd7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Templates/TestDriver.cxx.in

+ 1 - 1
Templates/TestDriver.cxx.in

@@ -97,7 +97,7 @@ int main(int ac, char* av[])
 
   /* If no test name was given */
   /* process command line with user function.  */
-  if (ac < 2) {
+  if (ac > 0 && ac < 2) {
     /* Ask for a test.  */
     printf("Available tests:\n");
     for (i = 0; i < NumTests; ++i) {