Closed Bug 1246499 Opened 5 years ago Closed 5 years ago

vfyserv fails to compile due to unused declared globals in vfyserv.h

Categories

(NSS :: Tools, defect)

3.22
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: elio.maldonado.batiz, Assigned: elio.maldonado.batiz)

Details

Attachments

(1 file)

The reported errors
....
make[3]: Entering directory '/home/emaldona/work4nss/upstream/NSS_3_22_RTM/nss/cmd/vfyserv'
gcc -o Linux4.5_x86_64_cc_glibc_PTH_64_DBG.OBJ/vfyserv.o -c -g -fPIC -DLINUX2_1 -m64 -Wall -Werror -pipe -ffunction-sections -fdata-sections -DLINUX -Dlinux -DHAVE_STRERROR -DXP_UNIX -DDLL_PREFIX=\"lib\" -DDLL_SUFFIX=\"so\" -DDEBUG -UNDEBUG -DDEBUG_emaldona -D_REENTRANT -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -I../../../dist/Linux4.5_x86_64_cc_glibc_PTH_64_DBG.OBJ/include -I../../../dist/public/nss -I../../../dist/private/nss -I../../../dist/public/seccmd -I../../../dist/public/dbm  vfyserv.c
In file included from vfyserv.c:40:0:
vfyserv.h:141:19: error: ‘defaultHeader’ defined but not used [-Werror=unused-const-variable]
 static const char defaultHeader[] = {
                   ^~~~~~~~~~~~~
vfyserv.h:140:19: error: ‘stopCmd’ defined but not used [-Werror=unused-const-variable]
 static const char stopCmd[] = { "GET /stop " };
                   ^~~~~~~
cc1: all warnings being treated as errors
Attachment #8716768 - Flags: review?(martin.thomson)
Assignee: nobody → emaldona
This breaks the downstream fedora build as I'm trying to rebase to NSS 3.22. When I build using the upstream sources I see same errors I posted above but the build succeeds. I haven't seen them in the nightly builds.
Comment on attachment 8716768 [details] [diff] [review]
remove defined but not used globals from vfyserv

Review of attachment 8716768 [details] [diff] [review]:
-----------------------------------------------------------------

This looks OK, but the patch lists vfyserv.h with the name "cmd/lib/vfyserv.h.defined_not_used", so this patch probably won't work.

Elio, you might like to configure mercurial for more context.  In my .hgrc, I have:

[diff]
git = 1
unified = 8
showfunc = 1
Attachment #8716768 - Flags: review?(martin.thomson) → review+
Thank you Martin for the prompt review. I attached a patch made with another tool and then forgot to regenerate it using 'hg diff' in the upstream source tree as I normally do.

Commit: https://hg.mozilla.org/projects/nss/rev/b27bfeb21edb
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.