sharklinux / shark

We're building a better performance management system
http://www.sharkly.io
GNU Lesser General Public License v2.1
79 stars 13 forks source link

Fix compile warning in core/shark.c. #13

Closed NanXiao closed 9 years ago

NanXiao commented 9 years ago

Fix clang compile warning in core/shark.c:

core/shark.c:319:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if(ret = luaL_loadfile(ls, argv[script])) {
           ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core/shark.c:319:9: note: place parentheses around the assignment to silence this warning
        if(ret = luaL_loadfile(ls, argv[script])) {
               ^
           (                                    )
core/shark.c:319:9: note: use '==' to turn this assignment into an equality comparison
        if(ret = luaL_loadfile(ls, argv[script])) {
               ^
               ==
1 warning generated.