src: squelch unused variable warning

|i| and |j| arent't used when building without crypto support.  Hat tip
to Brian White.

Rename |l| to |k| while we're here because it's quite hard to discern
from |i| or |j| with some fonts.
This commit is contained in:
Ben Noordhuis 2013-11-03 21:00:37 +01:00
parent bb909ad642
commit 962686b67b

View File

@ -2261,7 +2261,6 @@ void SetupProcessObject(Environment* env,
int exec_argc, int exec_argc,
const char* const* exec_argv) { const char* const* exec_argv) {
HandleScope scope(node_isolate); HandleScope scope(node_isolate);
int i, j;
Local<Object> process = env->process_object(); Local<Object> process = env->process_object();
@ -2311,11 +2310,13 @@ void SetupProcessObject(Environment* env,
#if HAVE_OPENSSL #if HAVE_OPENSSL
// Stupid code to slice out the version string. // Stupid code to slice out the version string.
int c, l = strlen(OPENSSL_VERSION_TEXT); {
for (i = j = 0; i < l; i++) { size_t i, j, k;
int c;
for (i = j = 0, k = sizeof(OPENSSL_VERSION_TEXT) - 1; i < k; ++i) {
c = OPENSSL_VERSION_TEXT[i]; c = OPENSSL_VERSION_TEXT[i];
if ('0' <= c && c <= '9') { if ('0' <= c && c <= '9') {
for (j = i + 1; j < l; j++) { for (j = i + 1; j < k; ++j) {
c = OPENSSL_VERSION_TEXT[j]; c = OPENSSL_VERSION_TEXT[j];
if (c == ' ') if (c == ' ')
break; break;
@ -2327,6 +2328,7 @@ void SetupProcessObject(Environment* env,
versions, versions,
"openssl", "openssl",
OneByteString(node_isolate, &OPENSSL_VERSION_TEXT[i], j - i)); OneByteString(node_isolate, &OPENSSL_VERSION_TEXT[i], j - i));
}
#endif #endif
// process.arch // process.arch