A symmetry group $\mathcal{G}$ may be represented on the physical Hilbert space by unitary operators $U(g)$ such that it satisfies the composition rule $$U(g_1)U(g_2)=e^{i\phi(g_1,g_2)}U(g_1g_2).\tag{1}$$ If $\phi(g_1,g_2)$ is of the form $$\phi(g_1,g_2)=\alpha(g_1g_2)-\alpha(g_1)-\alpha(g_2)\tag{2}$$ the projective representations in (1) with such a phase (2) can be replaced by an ordinary representation by replacing $U(g)$ with $$\tilde{U}(g)=e^{i\alpha(g)}U(g).\tag{3}$$ If I understand it correct, Weinberg says in his QFT book that $\phi=0$ satisfies relation (2), and is therefore, a trivial two-cocycle. I don't understand why $\phi=\pi$ cannot satisfy the relation (2). It is satisfied by choosing $$\pi+\alpha(g_1g_2)=\alpha(g_1)+\alpha(g_2)\tag{4}.$$
Therefore, projective representations corresponding to $\phi=\pi$ (or any constant value of $\phi$), can be eliminated by defining a new representation of the form (3). Do I misunderstand something?