This is just gcc being a bitch. I use gcc v4.3.2 to compile the published releases and gcc v4.4.3 to compile custom/test releases. If your version of gcc is newer, it might be more anal and issue more warnings (that are treated as error by default). To compile the viewer, ignore the warnings, by replacing:
with:
in linden/indra/buildlinux.sh