Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Removing Redundant Functions

Removing Redundant Functions

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    d3m0n
    wrote on last edited by
    #1

    I am working on a large codebase on VC++ 6.0, which contains many unused functions. i.e. functions that are never called from anywhere else in the code. I would like to delete these functions. Without having to run every possible scenario with some sort of code coverage tool, is there any possible way to find these functions? Currently all I can do is do a Find In Files on the function name and work it out. Thanks for your help...

    Cheers d3m0n

    Z 1 Reply Last reply
    0
    • D d3m0n

      I am working on a large codebase on VC++ 6.0, which contains many unused functions. i.e. functions that are never called from anywhere else in the code. I would like to delete these functions. Without having to run every possible scenario with some sort of code coverage tool, is there any possible way to find these functions? Currently all I can do is do a Find In Files on the function name and work it out. Thanks for your help...

      Cheers d3m0n

      Z Offline
      Z Offline
      zqueezy
      wrote on last edited by
      #2

      do you want to do that for your personal order? I mean the compiler sees which functions you use...

      D 1 Reply Last reply
      0
      • Z zqueezy

        do you want to do that for your personal order? I mean the compiler sees which functions you use...

        D Offline
        D Offline
        d3m0n
        wrote on last edited by
        #3

        Yes... it's sometimes confusing if you're changing a file, and there's a function in there with an obvious bug. There's no point trying to fix the bug if that function is totally redundant. Better to just remove it. So I was wondering if there was a way to find every redundant function, so I don't waste my time looking at them. Thanks.

        Cheers d3m0n

        D 1 Reply Last reply
        0
        • D d3m0n

          Yes... it's sometimes confusing if you're changing a file, and there's a function in there with an obvious bug. There's no point trying to fix the bug if that function is totally redundant. Better to just remove it. So I was wondering if there was a way to find every redundant function, so I don't waste my time looking at them. Thanks.

          Cheers d3m0n

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          [d3m0n] wrote:

          So I was wondering if there was a way to find every redundant function...

          Doesn't the profiler tell you this?


          "A good athlete is the result of a good and worthy opponent." - David Crow

          "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

          D 1 Reply Last reply
          0
          • D David Crow

            [d3m0n] wrote:

            So I was wondering if there was a way to find every redundant function...

            Doesn't the profiler tell you this?


            "A good athlete is the result of a good and worthy opponent." - David Crow

            "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

            D Offline
            D Offline
            d3m0n
            wrote on last edited by
            #5

            I could never get the profiler to work. Enabled the option in the project settings but the [Build->Profile] menu is always disabled. Might try again though if you think it would be useful for what I'm trying to do. Thanks.

            Cheers d3m0n

            D 1 Reply Last reply
            0
            • D d3m0n

              I could never get the profiler to work. Enabled the option in the project settings but the [Build->Profile] menu is always disabled. Might try again though if you think it would be useful for what I'm trying to do. Thanks.

              Cheers d3m0n

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              [d3m0n] wrote:

              Enabled the option in the project settings...

              On the Link tab, you checked the Enable profiling checkbox?


              "A good athlete is the result of a good and worthy opponent." - David Crow

              "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

              A D 2 Replies Last reply
              0
              • D David Crow

                [d3m0n] wrote:

                Enabled the option in the project settings...

                On the Link tab, you checked the Enable profiling checkbox?


                "A good athlete is the result of a good and worthy opponent." - David Crow

                "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                A Offline
                A Offline
                Arris74
                wrote on last edited by
                #7

                Interesting this profiler, I did not know its existence but do not see a profiler anywhere neither in Build menu nor in the settings. I use VS 2003. could you help please?

                1 Reply Last reply
                0
                • D David Crow

                  [d3m0n] wrote:

                  Enabled the option in the project settings...

                  On the Link tab, you checked the Enable profiling checkbox?


                  "A good athlete is the result of a good and worthy opponent." - David Crow

                  "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                  D Offline
                  D Offline
                  d3m0n
                  wrote on last edited by
                  #8

                  Yup, and rebuilt like it says in MSDN :(

                  Cheers d3m0n

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups