Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- xms@XMs-desktop ~/projects $ git clone https://github.com/xverizex/translate
- Клонирование в «translate»…
- remote: Counting objects: 115, done.
- remote: Compressing objects: 100% (62/62), done.
- remote: Total 115 (delta 60), reused 106 (delta 51), pack-reused 0
- Получение объектов: 100% (115/115), 170.73 KiB | 0 bytes/s, готово.
- Определение изменений: 100% (60/60), готово.
- Проверка соединения… готово.
- xms@XMs-desktop ~/projects $ cd translate/
- xms@XMs-desktop ~/projects/translate $ cat << EOF > CMakeLists.txt
- > cmake_minimum_required(VERSION 3.0)
- > add_executable(translate main.c)
- > EOF
- xms@XMs-desktop ~/projects/translate $ mkdir build
- xms@XMs-desktop ~/projects/translate $ cd build/
- xms@XMs-desktop ~/projects/translate/build $ scan-build cmake ../
- scan-build: Using '/usr/bin/x86_64-pc-linux-gnu-clang-3.7' for static analysis
- -- The C compiler identification is GNU 4.9.3
- -- The CXX compiler identification is GNU 4.9.3
- -- Check for working C compiler: /usr/bin/ccc-analyzer
- -- Check for working C compiler: /usr/bin/ccc-analyzer -- works
- -- Detecting C compiler ABI info
- -- Detecting C compiler ABI info - done
- -- Detecting C compile features
- -- Detecting C compile features - done
- -- Check for working CXX compiler: /usr/bin/c++-analyzer
- -- Check for working CXX compiler: /usr/bin/c++-analyzer -- works
- -- Detecting CXX compiler ABI info
- -- Detecting CXX compiler ABI info - done
- -- Detecting CXX compile features
- -- Detecting CXX compile features - done
- -- Configuring done
- -- Generating done
- -- Build files have been written to: /home/xms/projects/translate/build
- scan-build: Removing directory '/tmp/scan-build-2016-10-04-231727-19575-1' because it contains no reports.
- scan-build: No bugs found.
- xms@XMs-desktop ~/projects/translate/build $ scan-build make
- scan-build: Using '/usr/bin/x86_64-pc-linux-gnu-clang-3.7' for static analysis
- Scanning dependencies of target translate
- [ 50%] Building C object CMakeFiles/translate.dir/main.c.o
- /home/xms/projects/translate/main.c:169:4: warning: Potential leak of memory pointed to by 'target'
- fclose(dictionary);
- ^~~~~~
- /home/xms/projects/translate/main.c:406:17: warning: Call to 'calloc' has an allocation size of 0 bytes
- currentdir = calloc(punct - start, sizeof(char));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- /home/xms/projects/translate/main.c:440:2: warning: Potential leak of memory pointed to by 'cpath'
- char line[255];
- ^~~~~~~~~
- /home/xms/projects/translate/main.c:457:10: warning: Dereference of null pointer (loaded from variable 'ptr')
- for(;!isprint(*ptr);ptr++);
- ^~~~~~~~~~~~~
- /usr/include/ctype.h:203:21: note: expanded from macro 'isprint'
- # define isprint(c) __isctype((c), _ISprint)
- ^~~~~~~~~~~~~~~~~~~~~~~~
- /usr/include/ctype.h:89:30: note: expanded from macro '__isctype'
- ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type)
- ^~~
- /home/xms/projects/translate/main.c:477:10: warning: Dereference of null pointer (loaded from variable 'ptr')
- for(;!isprint(*ptr);ptr++);
- ^~~~~~~~~~~~~
- /usr/include/ctype.h:203:21: note: expanded from macro 'isprint'
- # define isprint(c) __isctype((c), _ISprint)
- ^~~~~~~~~~~~~~~~~~~~~~~~
- /usr/include/ctype.h:89:30: note: expanded from macro '__isctype'
- ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type)
- ^~~
- /home/xms/projects/translate/main.c:497:11: warning: Dereference of null pointer (loaded from variable 'ptr')
- for(;!isprint(*ptr);ptr++);
- ^~~~~~~~~~~~~
- /usr/include/ctype.h:203:21: note: expanded from macro 'isprint'
- # define isprint(c) __isctype((c), _ISprint)
- ^~~~~~~~~~~~~~~~~~~~~~~~
- /usr/include/ctype.h:89:30: note: expanded from macro '__isctype'
- ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type)
- ^~~
- /home/xms/projects/translate/main.c:518:11: warning: Dereference of null pointer (loaded from variable 'ptr')
- for(;!isprint(*ptr);ptr++);
- ^~~~~~~~~~~~~
- /usr/include/ctype.h:203:21: note: expanded from macro 'isprint'
- # define isprint(c) __isctype((c), _ISprint)
- ^~~~~~~~~~~~~~~~~~~~~~~~
- /usr/include/ctype.h:89:30: note: expanded from macro '__isctype'
- ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type)
- ^~~
- /home/xms/projects/translate/main.c:538:11: warning: Dereference of null pointer (loaded from variable 'ptr')
- for(;!isprint(*ptr);ptr++);
- ^~~~~~~~~~~~~
- /usr/include/ctype.h:203:21: note: expanded from macro 'isprint'
- # define isprint(c) __isctype((c), _ISprint)
- ^~~~~~~~~~~~~~~~~~~~~~~~
- /usr/include/ctype.h:89:30: note: expanded from macro '__isctype'
- ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type)
- ^~~
- /home/xms/projects/translate/main.c:559:11: warning: Dereference of null pointer (loaded from variable 'ptr')
- for(;!isprint(*ptr);ptr++);
- ^~~~~~~~~~~~~
- /usr/include/ctype.h:203:21: note: expanded from macro 'isprint'
- # define isprint(c) __isctype((c), _ISprint)
- ^~~~~~~~~~~~~~~~~~~~~~~~
- /usr/include/ctype.h:89:30: note: expanded from macro '__isctype'
- ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type)
- ^~~
- /home/xms/projects/translate/main.c:579:11: warning: Dereference of null pointer (loaded from variable 'ptr')
- for(;!isprint(*ptr);ptr++);
- ^~~~~~~~~~~~~
- /usr/include/ctype.h:203:21: note: expanded from macro 'isprint'
- # define isprint(c) __isctype((c), _ISprint)
- ^~~~~~~~~~~~~~~~~~~~~~~~
- /usr/include/ctype.h:89:30: note: expanded from macro '__isctype'
- ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type)
- ^~~
- /home/xms/projects/translate/main.c:599:11: warning: Dereference of null pointer (loaded from variable 'ptr')
- for(;!isprint(*ptr);ptr++);
- ^~~~~~~~~~~~~
- /usr/include/ctype.h:203:21: note: expanded from macro 'isprint'
- # define isprint(c) __isctype((c), _ISprint)
- ^~~~~~~~~~~~~~~~~~~~~~~~
- /usr/include/ctype.h:89:30: note: expanded from macro '__isctype'
- ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type)
- ^~~
- /home/xms/projects/translate/main.c:619:11: warning: Dereference of null pointer (loaded from variable 'ptr')
- for(;!isprint(*ptr);ptr++);
- ^~~~~~~~~~~~~
- /usr/include/ctype.h:203:21: note: expanded from macro 'isprint'
- # define isprint(c) __isctype((c), _ISprint)
- ^~~~~~~~~~~~~~~~~~~~~~~~
- /usr/include/ctype.h:89:30: note: expanded from macro '__isctype'
- ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type)
- ^~~
- /home/xms/projects/translate/main.c:639:11: warning: Dereference of null pointer (loaded from variable 'ptr')
- for(;!isprint(*ptr);ptr++);
- ^~~~~~~~~~~~~
- /usr/include/ctype.h:203:21: note: expanded from macro 'isprint'
- # define isprint(c) __isctype((c), _ISprint)
- ^~~~~~~~~~~~~~~~~~~~~~~~
- /usr/include/ctype.h:89:30: note: expanded from macro '__isctype'
- ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type)
- ^~~
- /home/xms/projects/translate/main.c:674:4: warning: Potential leak of memory pointed to by 'dir'
- return NULL;
- ^~~~~~~~~~~
- 14 warnings generated.
- [100%] Linking C executable translate
- [100%] Built target translate
- scan-build: 14 bugs found.
- scan-build: Run 'scan-view /tmp/scan-build-2016-10-04-231745-19789-1' to examine bug reports.
- xms@XMs-desktop ~/projects/translate/build $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement