Speaking as a non pilot but with awareness of Human Resource affairs, if a first officer or anyone else reports a Captain for smoking on the flight deck is consequently sacked then there is a strong case for unfair dismissal.
In any case, if the issue is reported to HR then they have to right to remain anonymous, therefore 'management' won't be able to dismiss them