He couldn't help warning.
Надо немного прояснить
He couldn't but warn Ему нельзя было не предупредить
He couldn't help warning Он не удержался чтобы не предупредить
He couldn't help but warn Он не мог не предупредить
He couldn't not to warn С недавнего времени можно и так говорить (с точки зрения правильности речи) Он не мог не предупредить
he wasn't able to warn me ой, сорри! я не внимательно прочла. думала, что надо не мог предупредить, а не мог не предупредить, это He couldn't not to warn me
He couldn't but warn
He couldn't help warning
He couldn't but say about it before
He couldn't help saying about it before
He couldn't fail to notify us (let us know beforehand).
Cannot fail to be/do something - used to express a strong belief that something must be the case/ (OxfordAmerican Dictionary)