Eliminate assigning to itself warnings in ltdl.c

The clang compiler flags 10 statements which were previously added to eliminate gcc unreferenced variable warnings.

warning: explicitly assigning a variable of type 'lt_user_data' (aka 'void *') to itself [-Wself-assign]
Eliminate warning signed/unsigned comparison