Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Splint (programming tool)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{refimprove|date=March 2013}} {{Infobox software | name = Splint | screenshot = | caption = | developer = [http://sourceforge.net/project/memberlist.php?group_id=34302 The Splint Developers] | latest release version = 3.1.2 | latest release date = {{Start date and age|2007|07|12}} | operating system = [[Cross-platform]] | genre = [[Static code analysis]] | license = [[GPL]] | website = {{URL|www.splint.org}} | repo = {{URL|github.com/splintchecker/splint}} }} '''Splint''', short for '''Secure Programming Lint''', is a [[programming tool]] for [[Static code analysis|statically checking]] [[C (programming language)|C programs]] for security [[vulnerability (computer science)|vulnerabilities]] and coding mistakes. Formerly called LCLint, it is a modern version of the [[Unix]] [[lint programming tool|lint]] tool. Splint has the ability to interpret special annotations to the [[source code]], which gives it stronger checking than is possible just by looking at the source alone. Splint is used by [[gpsd]] as part of an effort to design for zero defects.<ref>{{cite book|title=The Architecture of Open Source Applications, Volume II|year=2012|publisher=Lulu|isbn=9781105571817|url=http://www.aosabook.org/en/gpsd.html|author=Raymond|edition=Eric|editor1=Brown, Amy |editor2=Wison, Greg }}</ref> Splint is [[free software]] released under the terms of the [[GNU General Public License]]. Main development activity on Splint stopped in 2010. According to the [[Concurrent Versions System|CVS]] at [[SourceForge]], as of September 2012 the most recent change in the repository was in November 2010.<ref>{{cite web|accessdate=2012-09-11|url=http://sourceforge.net/project/stats/detail.php?group_id=34302&ugn=splint&type=cvs&mode=12months|title=Splint project CVS statistics}}</ref> A [[Git]] repository at [[GitHub]] has more recent changes, starting in July 2019.<ref>{{cite web|accessdate=2020-09-16|url=https://github.com/splintchecker/splint|title=Splint project git history|website=[[GitHub]] }}</ref> ==Example== <syntaxhighlight lang="c"> #include <stdio.h> int main() { char c; while (c != 'x'); { c = getchar(); if (c = 'x') return 0; switch (c) { case '\n': case '\r': printf("Newline\n"); default: printf("%c",c); } } return 0; } </syntaxhighlight> Splint's output: <pre><nowiki> Variable c used before definition Suspected infinite loop. No value used in loop test (c) is modified by test or loop body. Assignment of int to char: c = getchar() Test expression for if is assignment expression: c = 'x' Test expression for if not boolean, type char: c = 'x' Fall through case (no preceding break) </nowiki></pre> Fixed source: <syntaxhighlight lang="c"> #include <stdio.h> int main() { int c = 0; // Added an initial assignment definition. while (c != 'x') { c = getchar(); // Corrected type of c to int if (c == 'x') // Fixed the assignment error to make it a comparison operator. return 0; switch (c) { case '\n': case '\r': printf("Newline\n"); break; // Added break statement to prevent fall-through. default: printf("%c",c); break; //Added break statement to default catch, out of good practice. } } return 0; } </syntaxhighlight> ==See also== {{Portal|Free and open-source software}} *[[Buffer overflow]] *[[Memory debugger]] *[[Software testing]] *[[List of tools for static code analysis]] ==References== {{Reflist}} ==External links== *{{sourceforge|splint}} {{DEFAULTSORT:Splint (Programming Tool)}} [[Category:Static program analysis tools]] [[Category:Free memory management software]] [[Category:Cross-platform software]] [[Category:Free software testing tools]] [[Category:Software using the GNU General Public License]] {{programming-software-stub}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite book
(
edit
)
Template:Cite web
(
edit
)
Template:Infobox
(
edit
)
Template:Infobox software
(
edit
)
Template:Main other
(
edit
)
Template:Portal
(
edit
)
Template:Programming-software-stub
(
edit
)
Template:Refimprove
(
edit
)
Template:Reflist
(
edit
)
Template:Sourceforge
(
edit
)
Template:Template other
(
edit
)