This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 257545 - Format string inspector (and security inspectors) does not work right
Summary: Format string inspector (and security inspectors) does not work right
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 8.2
Hardware: PC Solaris
: P2 normal (vote)
Assignee: danilasergeyev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-13 09:44 UTC by Alexander Simon
Modified: 2016-02-02 13:05 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Simon 2016-01-13 09:44:53 UTC
I see several bugs.
1. inspector show warning twice if function declaration and definition in the same file.
2. inspector does not find warnings in the compound statements.
3. inspector does not found warnings in the expression statements if call is second in list.
Code example:

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void foo(int argc, char**argv);
int main(int argc, char**argv) {
    foo(argc, argv);
    return 0;
}
void foo(int argc, char**argv) {
    printf("Arguments (%ld):\n", argc);
    for (int i = 0; i < argc; i++,printf("%ld: %s\n", i, argv[i]));
    for (int i = 0; i < argc; i++) {
        printf("%ld: %s\n", i, argv[i]);
    }
    printf("%ld: %s\n", 0, argv[0]);
}
Comment 1 danilasergeyev 2016-01-14 15:50:47 UTC
fixed, change set c35c8a72a4d5 (enum)
Comment 2 Quality Engineering 2016-01-18 03:04:42 UTC
Integrated into 'main-silver', will be available in build *201601180002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e58a5817372c
User: Danila Sergeyev <danilasergeyev@netbeans.org>
Log: fix bug #257545 Format string inspector (and security inspectors) does not work right
(transplanted from c35c8a72a4d510197295657aa70a71dd7236e75d)
Comment 3 ilia 2016-01-27 14:43:10 UTC
  Fixes of this bug:
    http://hg.netbeans.org/releases/rev/c35c8a72a4d5
Comment 4 soldatov 2016-02-02 13:05:41 UTC
Verified in NetBeans 8.1 patch1