-
Notifications
You must be signed in to change notification settings - Fork 478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code static checks infered by Infer(x86_64) #1553
Comments
Interesting. Do they have GitHub actions? |
If the infer execution environment is prepared in the image to be used for github CI/CD, it seems possible. Facebook Infer Github Action workflow Local Docker Image |
issue namhyung#1553 related Null dereference amend works. Signed-off-by: Paran Lee <p4ranlee@gmail.com>
Add Null Checks in issue #1567 I try to divide the PR between the clean up works and modifying the logic while refactoring. |
Install ocaml with with ocaml package manager
|
issue namhyung#1553 related Null dereference amend works. Signed-off-by: Paran Lee <p4ranlee@gmail.com>
issue namhyung#1553 related Null dereference amend works. Signed-off-by: Paran Lee <p4ranlee@gmail.com>
issue #1553 related Null dereference amend works. Signed-off-by: Paran Lee <p4ranlee@gmail.com>
issue namhyung#1553 related Null dereference amend works. Signed-off-by: Paran Lee <p4ranlee@gmail.com>
issue namhyung#1553 related Null dereference amend works. Signed-off-by: Paran Lee <p4ranlee@gmail.com>
issue namhyung#1553 related Null dereference amend works. Signed-off-by: Paran Lee <p4ranlee@gmail.com>
issue namhyung#1553 related Null dereference amend works. Signed-off-by: Paran Lee <p4ranlee@gmail.com>
Do Infer with 6721fec.
|
Issue namhyung#1553 related ret variable dead store clean up. Signed-off-by: Paran Lee <p4ranlee@gmail.com>
issue namhyung#1553 related Dead Store clean up. Signed-off-by: Paran Lee <p4ranlee@gmail.com>
According to https://github.com/facebook/infer/blob/main/INSTALL.md#infer-dependencies-for-linux, sudo apt install -y opam pkg-config gcc clang autoconf automake cmake
./build-infer.sh clang
sudo make install or ./autogen.sh
./configure # Disable Java or C/C++/ObjC analyzers with --disable-java-analyzers or --disable-c-analyzers
make
# install Infer system-wide...
sudo make install
# ...or, alternatively, install Infer into your PATH
export PATH=`pwd`/infer/bin:$PATH |
Issue namhyung#1553 related ret variable dead store clean up. Signed-off-by: Paran Lee <p4ranlee@gmail.com> debug: refactor not needed initialization Not needed initialization on double variable. Signed-off-by: Paran Lee <p4ranlee@gmail.com>
Issue namhyung#1553 related ret variable dead store clean up. Not needed initialization on double variable. Signed-off-by: Paran Lee <p4ranlee@gmail.com>
Remove Not needed initialization on double variable. Fixed: namhyung#1553 Signed-off-by: Paran Lee <p4ranlee@gmail.com>
This patch fixes some dead store warnings found by a static analysis tool, called infer[1]. The warning messages are as follows. $ cd /path/to/uftrace $ infer run --force-integration make ... namhyung#24 utils/debug.c:386: error: Dead Store The value written to `&percent` (type `double`) is never used. 384. void print_diff_percent(uint64_t base_nsec, uint64_t pair_nsec) 385. { 386. double percent = 999.99; ^ namhyung#28 utils/debug.c:387: error: Dead Store The value written to `&sc` is never used. 385. { 386. double percent = 999.99; 387. const char *sc = get_color(COLOR_CODE_NORMAL); ^ 388. const char *ec = get_color(COLOR_CODE_RESET); 389. namhyung#31 utils/kernel.c:57: error: Dead Store The value written to `&ret` is never used. 55. { 56. struct kfilter *pos, *tmp; 57. int ret = -1; ^ 58. int fd; 59. namhyung#32 utils/perf.c:230: error: Dead Store The value written to `&start` is never used. 228. buf = &data[start & mask]; 229. size = end - start; 230. start += size; ^ And fix warning on compile time with including unistd.h header file. utils/kernel-parser.c:151:9: warning: implicit declaration of function 'close'; did you mean 'pclos'? [-Wimplicit-function-declaration] 151 | close(kp->fds[cpu]); | ^~~~~ | pclose [1] https://github.com/facebook/infer Fixed: namhyung#1553 Signed-off-by: Paran Lee <p4ranlee@gmail.com>
This patch fixes some dead store warnings found by a static analysis tool, called infer[1]. The warning messages are as follows. $ cd /path/to/uftrace $ infer run --force-integration make ... namhyung#24 utils/debug.c:386: error: Dead Store The value written to `&percent` (type `double`) is never used. 384. void print_diff_percent(uint64_t base_nsec, uint64_t pair_nsec) 385. { 386. double percent = 999.99; ^ namhyung#28 utils/debug.c:387: error: Dead Store The value written to `&sc` is never used. 385. { 386. double percent = 999.99; 387. const char *sc = get_color(COLOR_CODE_NORMAL); ^ 388. const char *ec = get_color(COLOR_CODE_RESET); 389. namhyung#31 utils/kernel.c:57: error: Dead Store The value written to `&ret` is never used. 55. { 56. struct kfilter *pos, *tmp; 57. int ret = -1; ^ 58. int fd; 59. namhyung#32 utils/perf.c:230: error: Dead Store The value written to `&start` is never used. 228. buf = &data[start & mask]; 229. size = end - start; 230. start += size; ^ And fix warning on compile time with including unistd.h header file. utils/kernel-parser.c:151:9: warning: implicit declaration of function 'close'; did you mean 'pclos'? [-Wimplicit-function-declaration] 151 | close(kp->fds[cpu]); | ^~~~~ | pclose [1] https://github.com/facebook/infer Fixed: namhyung#1553 Signed-off-by: Paran Lee <p4ranlee@gmail.com>
This patch fixes some dead store warnings found by a static analysis tool, called infer[1]. The warning messages are as follows. $ cd /path/to/uftrace $ infer run --force-integration make ... namhyung#24 utils/debug.c:386: error: Dead Store The value written to `&percent` (type `double`) is never used. 384. void print_diff_percent(uint64_t base_nsec, uint64_t pair_nsec) 385. { 386. double percent = 999.99; ^ namhyung#28 utils/debug.c:387: error: Dead Store The value written to `&sc` is never used. 385. { 386. double percent = 999.99; 387. const char *sc = get_color(COLOR_CODE_NORMAL); ^ 388. const char *ec = get_color(COLOR_CODE_RESET); 389. namhyung#31 utils/kernel.c:57: error: Dead Store The value written to `&ret` is never used. 55. { 56. struct kfilter *pos, *tmp; 57. int ret = -1; ^ 58. int fd; 59. namhyung#32 utils/perf.c:230: error: Dead Store The value written to `&start` is never used. 228. buf = &data[start & mask]; 229. size = end - start; 230. start += size; ^ And fix warning on compile time with including unistd.h header file. utils/kernel-parser.c:151:9: warning: implicit declaration of function 'close'; did you mean 'pclos'? [-Wimplicit-function-declaration] 151 | close(kp->fds[cpu]); | ^~~~~ | pclose [1] https://github.com/facebook/infer Fixed: namhyung#1553 Signed-off-by: Paran Lee <p4ranlee@gmail.com>
This patch fixes some dead store warnings found by a static analysis tool, called infer[1]. The warning messages are as follows. $ cd /path/to/uftrace $ infer run --force-integration make ... utils/debug.c:386: error: Dead Store The value written to `&percent` (type `double`) is never used. 384. void print_diff_percent(uint64_t base_nsec, uint64_t pair_nsec) 385. { 386. double percent = 999.99; ^ utils/debug.c:387: error: Dead Store The value written to `&sc` is never used. 385. { 386. double percent = 999.99; 387. const char *sc = get_color(COLOR_CODE_NORMAL); ^ 388. const char *ec = get_color(COLOR_CODE_RESET); 389. utils/kernel.c:57: error: Dead Store The value written to `&ret` is never used. 55. { 56. struct kfilter *pos, *tmp; 57. int ret = -1; ^ 58. int fd; 59. utils/perf.c:230: error: Dead Store The value written to `&start` is never used. 228. buf = &data[start & mask]; 229. size = end - start; 230. start += size; ^ And fix warning on compile time with including unistd.h header file. utils/kernel-parser.c:151:9: warning: implicit declaration of function 'close'; did you mean 'pclos'? [-Wimplicit-function-declaration] 151 | close(kp->fds[cpu]); | ^~~~~ | pclose [1] https://github.com/facebook/infer Fixed: namhyung#1553 Signed-off-by: Paran Lee <p4ranlee@gmail.com>
time implicit declaration This patch fixes some dead store warnings found by a static analysis tool, called infer[1]. The warning messages are as follows. $ cd /path/to/uftrace $ infer run --force-integration make ... utils/debug.c:386: error: Dead Store The value written to `&percent` (type `double`) is never used. 384. void print_diff_percent(uint64_t base_nsec, uint64_t pair_nsec) 385. { 386. double percent = 999.99; ^ utils/debug.c:387: error: Dead Store The value written to `&sc` is never used. 385. { 386. double percent = 999.99; 387. const char *sc = get_color(COLOR_CODE_NORMAL); ^ 388. const char *ec = get_color(COLOR_CODE_RESET); 389. utils/kernel.c:57: error: Dead Store The value written to `&ret` is never used. 55. { 56. struct kfilter *pos, *tmp; 57. int ret = -1; ^ 58. int fd; 59. utils/perf.c:230: error: Dead Store The value written to `&start` is never used. 228. buf = &data[start & mask]; 229. size = end - start; 230. start += size; ^ And fix warning on compile time with including unistd.h header file. utils/kernel-parser.c:151:9: warning: implicit declaration of function 'close'; did you mean 'pclos'? [-Wimplicit-function-declaration] 151 | close(kp->fds[cpu]); | ^~~~~ | pclose [1] https://github.com/facebook/infer Fixed: namhyung#1553 Signed-off-by: Paran Lee <p4ranlee@gmail.com>
time implicit declaration This patch fixes some dead store warnings found by a static analysis tool, called infer[1]. The warning messages are as follows. $ cd /path/to/uftrace $ infer run --force-integration make ... utils/debug.c:386: error: Dead Store The value written to `&percent` (type `double`) is never used. 384. void print_diff_percent(uint64_t base_nsec, uint64_t pair_nsec) 385. { 386. double percent = 999.99; ^ utils/debug.c:387: error: Dead Store The value written to `&sc` is never used. 385. { 386. double percent = 999.99; 387. const char *sc = get_color(COLOR_CODE_NORMAL); ^ 388. const char *ec = get_color(COLOR_CODE_RESET); 389. utils/kernel.c:57: error: Dead Store The value written to `&ret` is never used. 55. { 56. struct kfilter *pos, *tmp; 57. int ret = -1; ^ 58. int fd; 59. utils/perf.c:230: error: Dead Store The value written to `&start` is never used. 228. buf = &data[start & mask]; 229. size = end - start; 230. start += size; ^ And fix warning on compile time with including unistd.h header file. utils/kernel-parser.c:151:9: warning: implicit declaration of function 'close'; did you mean 'pclos'? [-Wimplicit-function-declaration] 151 | close(kp->fds[cpu]); | ^~~~~ | pclose [1] https://github.com/facebook/infer Fixed: namhyung#1553, namhyung#1859 Signed-off-by: Paran Lee <p4ranlee@gmail.com>
warning on compile time implicit declaration This patch fixes some dead store warnings found by a static analysis tool, called infer[1]. The warning messages are as follows. $ cd /path/to/uftrace $ infer run --force-integration make ... utils/debug.c:386: error: Dead Store The value written to `&percent` (type `double`) is never used. 384. void print_diff_percent(uint64_t base_nsec, uint64_t pair_nsec) 385. { 386. double percent = 999.99; ^ utils/debug.c:387: error: Dead Store The value written to `&sc` is never used. 385. { 386. double percent = 999.99; 387. const char *sc = get_color(COLOR_CODE_NORMAL); ^ 388. const char *ec = get_color(COLOR_CODE_RESET); 389. utils/kernel.c:57: error: Dead Store The value written to `&ret` is never used. 55. { 56. struct kfilter *pos, *tmp; 57. int ret = -1; ^ 58. int fd; 59. utils/perf.c:230: error: Dead Store The value written to `&start` is never used. 228. buf = &data[start & mask]; 229. size = end - start; 230. start += size; ^ And fix warning on compile time with including unistd.h header file. utils/kernel-parser.c:151:9: warning: implicit declaration of function 'close'; did you mean 'pclos'? [-Wimplicit-function-declaration] 151 | close(kp->fds[cpu]); | ^~~~~ | pclose [1] https://github.com/facebook/infer Fixed: namhyung#1553, namhyung#1859 Signed-off-by: Paran Lee <p4ranlee@gmail.com>
warning on compile time implicit declaration This patch fixes some dead store warnings found by a static analysis tool, called infer[1]. The warning messages are as follows. $ cd /path/to/uftrace $ infer run --force-integration make ... utils/debug.c:386: error: Dead Store The value written to `&percent` (type `double`) is never used. 384. void print_diff_percent(uint64_t base_nsec, uint64_t pair_nsec) 385. { 386. double percent = 999.99; ^ utils/debug.c:387: error: Dead Store The value written to `&sc` is never used. 385. { 386. double percent = 999.99; 387. const char *sc = get_color(COLOR_CODE_NORMAL); ^ 388. const char *ec = get_color(COLOR_CODE_RESET); 389. utils/kernel.c:57: error: Dead Store The value written to `&ret` is never used. 55. { 56. struct kfilter *pos, *tmp; 57. int ret = -1; ^ 58. int fd; 59. utils/perf.c:230: error: Dead Store The value written to `&start` is never used. 228. buf = &data[start & mask]; 229. size = end - start; 230. start += size; ^ And fix warning on compile time with including unistd.h header file. utils/kernel-parser.c:151:9: warning: implicit declaration of function 'close'; did you mean 'pclos'? [-Wimplicit-function-declaration] 151 | close(kp->fds[cpu]); | ^~~~~ | pclose [1] https://github.com/facebook/infer Fixed: namhyung#1553, namhyung#1859 Signed-off-by: Paran Lee <p4ranlee@gmail.com>
This patch fixes some dead store warnings found by a static analysis tool, called infer[1]. The warning messages are as follows. $ cd /path/to/uftrace $ infer run --force-integration make ... utils/debug.c:386: error: Dead Store The value written to `&percent` (type `double`) is never used. 384. void print_diff_percent(uint64_t base_nsec, uint64_t pair_nsec) 385. { 386. double percent = 999.99; ^ utils/debug.c:387: error: Dead Store The value written to `&sc` is never used. 385. { 386. double percent = 999.99; 387. const char *sc = get_color(COLOR_CODE_NORMAL); ^ 388. const char *ec = get_color(COLOR_CODE_RESET); 389. utils/kernel.c:57: error: Dead Store The value written to `&ret` is never used. 55. { 56. struct kfilter *pos, *tmp; 57. int ret = -1; ^ 58. int fd; 59. utils/perf.c:230: error: Dead Store The value written to `&start` is never used. 228. buf = &data[start & mask]; 229. size = end - start; 230. start += size; ^ [1] https://github.com/facebook/infer Fixed: namhyung#1553 Signed-off-by: Paran Lee <p4ranlee@gmail.com>
This patch fixes some dead store warnings found by a static analysis tool, called infer[1]. The warning messages are as follows. $ cd /path/to/uftrace $ infer run --force-integration make ... utils/debug.c:386: error: Dead Store The value written to `&percent` (type `double`) is never used. 384. void print_diff_percent(uint64_t base_nsec, uint64_t pair_nsec) 385. { 386. double percent = 999.99; ^ utils/debug.c:387: error: Dead Store The value written to `&sc` is never used. 385. { 386. double percent = 999.99; 387. const char *sc = get_color(COLOR_CODE_NORMAL); ^ 388. const char *ec = get_color(COLOR_CODE_RESET); 389. utils/kernel.c:57: error: Dead Store The value written to `&ret` is never used. 55. { 56. struct kfilter *pos, *tmp; 57. int ret = -1; ^ 58. int fd; 59. utils/perf.c:230: error: Dead Store The value written to `&start` is never used. 228. buf = &data[start & mask]; 229. size = end - start; 230. start += size; ^ [1] https://github.com/facebook/infer Fixed: #1553 Signed-off-by: Paran Lee <p4ranlee@gmail.com>
There are infering to improve the uftrace project codes from Facebook Infer.
Install and static analyze process
Result
List
The text was updated successfully, but these errors were encountered: