Closed jkeenan closed 3 years ago
NYTProf.xs:1220:1: warning: unused function 'get_str_id' [-Wunused-function] get_strid(pTHX char* str, STRLEN len) ^ [snip]
I note that in NYTProf.xs
, the definition of get_str_id
is prefaced with this comment:
/**
* Return a unique persistent id number for a string.
*
* XXX Currently not used, so may trigger compiler warnings, but is intended to be
* used to assign ids to strings like subroutine names like we do for file ids.
*/
This problem is partially alleviated by https://github.com/timbunce/devel-nytprof/pull/157 committed to master last night. What remains: (1) function unused warning being emitted by each of the 3 C-compilers I've tried (clang-10
, gcc-9
, g++-9
); and (2) other g++
warnings which I'll detail in a subsequent post.
As to (1): This may be addressed by simply removing this unused function from NYTProf.xs
. I'm thinking of creating a directory in the distribution simply to hold code that we've deleted. Such a directory would at least enable downstream users who might have used undocumented or untested code to locate the code if they really want to use it or want us to officially support it.
As to (2): Some patches from https://github.com/timbunce/devel-nytprof/pull/134 will address some of the g++
warnings, but my preliminary investigation suggests there might still be a few to work on.
Thank you very much. Jim Keenan
CPAN release 6.08 eliminates the build-time warnings we've observed on Linux, FreeBSD, OpenBSD and Windows. So this ticket is now closable.
While looking into Devel-NYTProf's test failures on bleadperl today, I observed these build-time warnings generated during
make
using Clang 10.0.1 as the C-compiler on FreeBSD-12.I doubt these warnings are directly related to the test failures. However, if they could be cleaned up in the course of other updating of Devel-NYTProf, that would be nice.
Thank you very much.