Thread: A memory leak

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Registered User rstanley's Avatar
    Join Date
    Jun 2014
    Location
    New York, NY
    Posts
    1,127
    If you think I caught OCD, you're. right. I'd hate to hear Splint complain about anything. That's why I assign function values to integer variables when most programmers wouldn't do that.
    If you are capturing the output from output functions just to prevent messages from splint, don't waste your time! use:
    Code:
    splint -retvalint  ./source_file.c
    You should be checking the return value from scanf() to see if the entry was correct:
    Code:
    How many Fibonacci numbers should I generate?
    a12
    65636608 is not betweem 1 and 30.
    Also, you should be initializing all your local variables, which explains the erroneous value in my test with "A12".
    Last edited by rstanley; 03-16-2024 at 05:25 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. memory leak
    By *nick in forum Windows Programming
    Replies: 8
    Last Post: 09-17-2012, 06:15 PM
  2. Possible memory leak?
    By 127.0.0.1 in forum C Programming
    Replies: 21
    Last Post: 05-02-2011, 04:53 PM
  3. Replies: 2
    Last Post: 09-28-2006, 01:06 PM
  4. Is this a memory leak?
    By jasonhv in forum C++ Programming
    Replies: 5
    Last Post: 10-20-2005, 08:37 PM
  5. How is this a Memory Leak?
    By Cheeze-It in forum C++ Programming
    Replies: 4
    Last Post: 05-24-2002, 04:59 AM

Tags for this Thread