Merge branch 'master' into cleanup
authorDale Weiler <weilercdale@gmail.com>
Sun, 3 Jan 2016 03:30:35 +0000 (22:30 -0500)
committerDale Weiler <weilercdale@gmail.com>
Sun, 3 Jan 2016 03:30:35 +0000 (22:30 -0500)
exec.cpp
parser.cpp
test.cpp

index bfb090cafcee68d580068ba1e6ac9ebd562c1946..e76004ec313a4b5c7e6e29796e43741a618666b8 100644 (file)
--- a/exec.cpp
+++ b/exec.cpp
@@ -629,7 +629,7 @@ static qcvm_parameter *main_params = nullptr;
     if (prog->argc != (num)) {                                                 \
         prog->vmerror++;                                                       \
         fprintf(stderr, "ERROR: invalid number of arguments for %s: %i, expected %i\n", \
-        __FUNCTION__, prog->argc, (num));                                      \
+        __func__, prog->argc, (num));                                      \
         return -1;                                                             \
     }                                                                          \
 } while (0)
index df1715c53f2709371aeadb62af7810460b97f1d8..51f7e1ea6c571d20b158953b803b306f52f1c35d 100644 (file)
@@ -2523,8 +2523,7 @@ static bool parse_for_go(parser_t *parser, ast_block *block, ast_expression **ou
             parseerror(parser, "expected for-loop condition");
             goto onerr;
         }
-    }
-    else if (!parser_next(parser)) {
+    } else if (!parser_next(parser)) {
         parseerror(parser, "expected for-loop condition");
         goto onerr;
     }
@@ -2535,7 +2534,6 @@ static bool parse_for_go(parser_t *parser, ast_block *block, ast_expression **ou
         if (!cond)
             goto onerr;
     }
-
     /* move on to incrementor */
     if (parser->tok != ';') {
         parseerror(parser, "expected semicolon after for-loop initializer");
index 6d783f7650781c9997d0feb8c02fa6401189d09f..2614c7f1dd78a5ae525c835a103c80e15ef57926 100644 (file)
--- a/test.cpp
+++ b/test.cpp
@@ -638,6 +638,8 @@ static bool task_propagate(const char *curdir, size_t *pad, const char *defs) {
                 const char      *qcflags = nullptr;
                 task_t           task;
 
+                memset(&task, 0, sizeof(task));
+
                 found ++;
                 if (!tmpl) {
                     con_err("error compiling task template: %s\n", files->d_name);