Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - map file info: (6 Items)
   
map file info  
In QNX4 watcom days, map file could be used to analyze which functions are in source code, but are never used, or if 
they are used only locally.

Is there any possibility to get this information in QXN 6.4.1?

Reason: I am making some changes to downloaded code, I and would like to "clean" it as much as possible from remnants.

Regards, PKY
Re: map file info  
You can build your application using:

# make CCOPTS="-Wunused-function"

For more warning options you can pass to the compiler, you 
can refer to this page:
http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html




Pavol Kycina wrote:
> In QNX4 watcom days, map file could be used to analyze which functions are in source code, but are never used, or if 
they are used only locally.
> 
> Is there any possibility to get this information in QXN 6.4.1?
> 
> Reason: I am making some changes to downloaded code, I and would like to "clean" it as much as possible from remnants.

> 
> Regards, PKY
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post44289
> 

Re: map file info  
Thanks for quick reply.

But:
- according to the web page mentioned, it's only for static functions
- even if I created a static function, it hasn't reported anything

I have use both
-Wc,-Wunused-function
-Wunused-function

Regards, PKY

> You can build your application using:
> 
> # make CCOPTS="-Wunused-function"
> 
> For more warning options you can pass to the compiler, you 
> can refer to this page:
> http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
> 
> 
> 
> 
> Pavol Kycina wrote:
> > In QNX4 watcom days, map file could be used to analyze which functions are 
> in source code, but are never used, or if they are used only locally.
> > 
> > Is there any possibility to get this information in QXN 6.4.1?
> > 
> > Reason: I am making some changes to downloaded code, I and would like to "
> clean" it as much as possible from remnants.
> > 
> > Regards, PKY
> > 
> > 
> > 
> > _______________________________________________
> > 
> > General
> > http://community.qnx.com/sf/go/post44289
> > 
> 


Re: map file info  
the warning should be there.

Try "-Wall -Werror"


Pavol Kycina wrote:
> Thanks for quick reply.
> 
> But:
> - according to the web page mentioned, it's only for static functions
> - even if I created a static function, it hasn't reported anything
> 
> I have use both
> -Wc,-Wunused-function
> -Wunused-function
> 
> Regards, PKY
> 
>> You can build your application using:
>>
>> # make CCOPTS="-Wunused-function"
>>
>> For more warning options you can pass to the compiler, you 
>> can refer to this page:
>> http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
>>
>>
>>
>>
>> Pavol Kycina wrote:
>>> In QNX4 watcom days, map file could be used to analyze which functions are 
>> in source code, but are never used, or if they are used only locally.
>>> Is there any possibility to get this information in QXN 6.4.1?
>>>
>>> Reason: I am making some changes to downloaded code, I and would like to "
>> clean" it as much as possible from remnants.
>>> Regards, PKY
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> General
>>> http://community.qnx.com/sf/go/post44289
>>>
> 
> 
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post44294
> 

Re: map file info  
No, it's not reporting anything about unused functions.

> the warning should be there.
> 
> Try "-Wall -Werror"
> 
> 
> Pavol Kycina wrote:
> > Thanks for quick reply.
> > 
> > But:
> > - according to the web page mentioned, it's only for static functions
> > - even if I created a static function, it hasn't reported anything
> > 
> > I have use both
> > -Wc,-Wunused-function
> > -Wunused-function
> > 
> > Regards, PKY
> > 
> >> You can build your application using:
> >>
> >> # make CCOPTS="-Wunused-function"
> >>
> >> For more warning options you can pass to the compiler, you 
> >> can refer to this page:
> >> http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
> >>
> >>
> >>
> >>
> >> Pavol Kycina wrote:
> >>> In QNX4 watcom days, map file could be used to analyze which functions are
>  
> >> in source code, but are never used, or if they are used only locally.
> >>> Is there any possibility to get this information in QXN 6.4.1?
> >>>
> >>> Reason: I am making some changes to downloaded code, I and would like to "
> 
> >> clean" it as much as possible from remnants.
> >>> Regards, PKY
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>>
> >>> General
> >>> http://community.qnx.com/sf/go/post44289
> >>>
> > 
> > 
> > 
> > 
> > 
> > 
> > _______________________________________________
> > 
> > General
> > http://community.qnx.com/sf/go/post44294
> > 
> 


Re: map file info  
You should get warnings like this:


/space/src/foobar/main.c:9: warning: 'unusedfunc' defined 
but not used


Try doing this:

# make clean
# make CCOPTS="-Wall" > log 2>&1

and then

# grep "warning" log

to see if there is anything there

If you still don't get any warnings, could you give a sample 
source file that shows that?

Thanks,

Aleksandar


Pavol Kycina wrote:
> No, it's not reporting anything about unused functions.
> 
>> the warning should be there.
>>
>> Try "-Wall -Werror"
>>
>>
>> Pavol Kycina wrote:
>>> Thanks for quick reply.
>>>
>>> But:
>>> - according to the web page mentioned, it's only for static functions
>>> - even if I created a static function, it hasn't reported anything
>>>
>>> I have use both
>>> -Wc,-Wunused-function
>>> -Wunused-function
>>>
>>> Regards, PKY
>>>
>>>> You can build your application using:
>>>>
>>>> # make CCOPTS="-Wunused-function"
>>>>
>>>> For more warning options you can pass to the compiler, you 
>>>> can refer to this page:
>>>> http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
>>>>
>>>>
>>>>
>>>>
>>>> Pavol Kycina wrote:
>>>>> In QNX4 watcom days, map file could be used to analyze which functions are
>>  
>>>> in source code, but are never used, or if they are used only locally.
>>>>> Is there any possibility to get this information in QXN 6.4.1?
>>>>>
>>>>> Reason: I am making some changes to downloaded code, I and would like to "
>>>> clean" it as much as possible from remnants.
>>>>> Regards, PKY
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>>
>>>>> General
>>>>> http://community.qnx.com/sf/go/post44289
>>>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> General
>>> http://community.qnx.com/sf/go/post44294
>>>
> 
> 
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post44296
>