Fix compiler warnings

Do not definee NETWORK_ENABLE_LOGGING if already defined
Merge pull request #367 from ruslo/define.warnings

Fix compiler warnings