Re: [DynInst_API:] [RFC PATCH] Cleanup warnings

2016-04-30 Thread Peter Foley
On Fri, Apr 29, 2016 at 5:24 PM, Bill Williams wrote: > InstructionDecoder-aarch64.C: we'd better be null-checking and failing the > entire decode if we hit the failure cases in this patch. Since most of the functions that call this code path return void, it wasn't at all clear

Re: [DynInst_API:] [RFC PATCH] Cleanup warnings

2016-04-29 Thread Bill Williams
On 04/29/2016 05:08 PM, Peter Foley wrote: On Fri, Apr 29, 2016 at 5:24 PM, Bill Williams wrote: And a general note for developers: we should prefer using scoped_ptr and a custom destructor for file descriptors and other such things where we're going to error-check, clean up,

Re: [DynInst_API:] [RFC PATCH] Cleanup warnings

2016-04-29 Thread Peter Foley
On Fri, Apr 29, 2016 at 5:24 PM, Bill Williams wrote: > And a general note for developers: we should prefer using scoped_ptr and a > custom destructor for file descriptors and other such things where we're > going to error-check, clean up, and bail multiple times in a function.

Re: [DynInst_API:] [RFC PATCH] Cleanup warnings

2016-04-29 Thread Peter Foley
On Fri, Apr 29, 2016 at 5:24 PM, Bill Williams wrote: > Taking things in patch order: > > codegen-x86.C: fine to remove rather than commenting dead code there > dyninstAPI/src/linux.C: by symmetry, use pclose if reading the first line > fails. > InstructionDecoder-aarch64.C:

Re: [DynInst_API:] [RFC PATCH] Cleanup warnings

2016-04-28 Thread Bill Williams
To: dyninst-api@cs.wisc.edu Subject: [DynInst_API:] [RFC PATCH] Cleanup warnings Fix a bunch of misc warnings. [ 8%] Building CXX object common/CMakeFiles/common.dir/src/arch-aarch64.C.o /home/peter/dyninst/common/src/arch-aarch64.C:111:45: warning: unused parameter ‘ptr’ [-Wunused-para