Silence useless warning in src/json/json_spirit_writer_template.h to make important warnings easier to see.
warning: typedef ‘Char_type’ locally defined but not used [-Wunused-local-typedefs]
Silence useless warning in src/json/json_spirit_writer_template.h to make important warnings easier to see.
warning: typedef ‘Char_type’ locally defined but not used [-Wunused-local-typedefs]
warning: typedef ‘Char_type’ locally defined but not used [-Wunused-local-typedefs]
ACK, though ideally a better solution could be found.
I think there is another pull req for updating json_spirit, and this sort of thing needs coordination with that PR.
NACK, we should not change code here. As far as I remember this is under some license, which permits it? There was a discussion about this some months ago.
If bitcoin relies on code that doesn't permit changes, then we need a policy discussion.
ACK if and only if these changes have been submitted upstream (assuming they're still relevant upstream).
The warning noise has been an irritation for me to.
I have a pet peeve for commenting out code; remove it if it should be removed. Or use a #pragma to suppress the warning if you're worried some obscure use of json_spirit might need the typedef.
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/a6b3de139554574075008546e725d1ea604b266f for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.
Some time ago, there was a suggestion in a discussion to move json_spirit to a separate repository (like LevelDB), so such changes could be made outside the Bitcoin tree.
Having this submitted upstream sounds like the best solution here though.
On the other hand we don't really keep up with upstream (http://www.codeproject.com/Articles/20027/JSON-Spirit-A-C-JSON-Parser-Generator-Implemented). Last time we tried to upgrade json spirit was a horrible fail that we had to revert immediately.
What's the verdict here? In general I agree with the "let's not diverge further from upstream" however seemingly we've already diverged and it's only a single line change so I'm fine with merging it (or deleting the line as @gavinandresen prefers).
I'm doing this also, so perhaps we should just merge it.
27 | @@ -28,7 +28,8 @@ 28 | template< class String_type > 29 | String_type non_printable_to_string( unsigned int c ) 30 | { 31 | - typedef typename String_type::value_type Char_type; 32 | + // Silence the warning: typedef ‘Char_type’ locally defined but not used [-Wunused-local-typedefs] 33 | + // typedef typename String_type::value_type Char_type;
I think it's cleaner to comment code out by using // in front of the code without indentation.
Tired of talking about this....