(2)The Chief Officer may, it appears to him necessary so to do cause a proper hoarding or fencing or other means of protection to be, put up at the expenses of the owner of such wall or building for the safety of the public or inmates thereof and may after giving them such notice as the Chief Officer may think necessary, require the inmates of the building to vacate it.