
22 N.Y.2d 239 (1968)
The People of the State of New York ex rel. John Gallagher, Appellant,
v.
Harold W. Follette, as Warden of Green Haven Prison, Respondent.
The People of the State of New York ex rel. Charles Butler, Appellant,
v.
Harold W. Follette, as Warden of Green Haven Prison, Respondent.
The People of the State of New York ex rel. Robert J. Enright, Appellant,
v.
Vincent R. Mancusi, as Warden of Attica State Prison, Respondent.
The People of the State of New York ex rel. Walter Shults, Appellant,
v.
Harold W. Follette, as Warden of Green Haven Prison, Respondent.
Court of Appeals of the State of New York.
Argued April 18, 1968.
Decided June 5, 1968.
Leon B. Polsky and Anthony F. Marra for appellants in the first and second above-entitled proceedings.
Louis J. Lefkowitz, Attorney-General (Michael Jaffe and Samuel A. Hirshowitz of counsel), for respondent in the first and second above-entitled proceedings.
Bruce K. Carpenter for appellant in the third above-entitled proceeding.
Thomas J. Mackell, District Attorney (George D. Marlow of counsel), for respondent in the third above-entitled proceeding.
Thomas M. McDade for appellant in the fourth above-entitled proceeding.
Louis J. Lefkowitz, Attorney-General (John G. Proudfit and Samuel A. Hirshowitz of counsel), for respondent in the fourth above-entitled proceeding.
Judges BURKE, SCILEPPI, BERGAN, KEATING, BREITEL and JASEN concur.
*242Chief Judge FULD.
These cases, argued together on appeal, involve the interpretation of former section 335-b (now § 335-c) of the Code of Criminal Procedure, as it read prior to its amendment in 1963. At that time, the statute provided that a warning as to the possible effect of prior convictions upon a defendant's sentence had to be given by the court "upon the arraignment *243 of the defendant and before accepting a plea" (L. 1959, ch. 219, § 1).[1]

People ex rel. Gallagher v. Follette; People ex rel. Butler v. Follette; People ex rel. Enright v. Mancusi.
Each of the relators in the above cases failed to receive the statutory warning at his initial arraignment, where he pleaded not guilty. Subsequently, each of them changed his plea to guilty to a lesser charge and, in each case, was given the full warning required by section 335-b prior to the acceptance of his plea. All of the relators now argue that, despite the warning which they received at the time when they entered their guilty pleas, the absence of a warning at the initial arraignment was sufficiently prejudicial to render their convictions void.
The purpose of section 335-b, with its warning requirement, is quite clear; it is, we wrote in People ex rel. Colan v. La Vallee (14 N Y 2d 83, 86), "to afford an accused the opportunity of deciding whether to plead guilty, knowing he runs the risk of a more severe sentence, or to deny guilt and stand trial." (See, also, Matter of Astman v. Kelly, 2 N Y 2d 567; cf. People v. Gowasky, 244 N.Y. 451, 465.) Obviously, if a defendant does not request the court to accept a guilty plea but, instead, manifests an intent to plead not guilty and stand trial, no purpose whatsoever would be served by warning him of the consequences of a guilty plea. For this reason, this court has consistently held that a defendant who has pleaded not guilty is not entitled to habeas corpus relief for the failure of the trial judge to accord him the statutory warning upon arraignment. *244 (See, e.g., People ex rel. Purvis v. La Vallee, 18 N Y 2d 753; People v. Porter, 14 N Y 2d 785, 786.) The subsequent decision of these relators to change their pleas to guilty does not change this result, so long as they were given the monition before their new pleas were accepted. (See People ex rel. Warrelman v. Fay, 20 N Y 2d 646, denying lv. to app., 27 A D 2d 844; People ex rel. Grant v. La Vallee, 17 N Y 2d 418, denying lv. to app., 24 A D 2d 844; People ex rel. Furey v. McMann, 16 N Y 2d 484, denying lv. to app., 24 A D 2d 680; People ex rel. Wiggins v. La Vallee, 15 N Y 2d 484, denying lv. to app., 23 A D 2d 537; People ex rel. Dies v. McMann, 23 A D 2d 613.) In each of these cited cases, as in those now before us, the relator was warned before he entered his plea of guilty even though he did not receive a warning when first arraigned. The lack of a warning upon such an initial arraignment  at which a not guilty plea was entered  could not possibly have occasioned any harm or prejudice, and it is not a sufficient ground for vacating a later plea, made only after the defendant had been fully warned of the consequences.

People ex rel. Shults v. Follette
In this case, the relator had been given the statutory warning both at his arraignment and just prior to the time he entered his initial plea of guilty to robbery in the first degree. Several months later, however, he was permitted to withdraw that plea and plead guilty to second degree robbery. It was at this time, he notes, that the necessary warning was not given and, on the basis of this, he now seeks a vacatur of his conviction.
Although the rule has been broadly stated that the section 335-b warning must be given before acceptance of a guilty plea regardless of warnings given at earlier stages of the proceedings (see People ex rel. Carlat v. Follette, 21 N Y 2d 732; People ex rel. Bianchi v. La Vallee, 17 N Y 2d 818; People ex rel. Manning v. Fay, 16 N Y 2d 1061; cf. People ex rel. Miller v. Martin, 1 N Y 2d 406), it does not apply to a case such as the present. Here, the relator pleaded guilty to first degree robbery after receiving the essential monition. He was then permitted to change that plea to guilty to robbery in a lower degree solely to permit the court to render a lighter sentence than *245 could otherwise have been imposed. His decision to waive the right to trial had already been made with full knowledge of its implications and no purpose whatsoever would have been served by a later reminder of the consequences of his act.
In short, the relators in these several cases received the statutory warning as to the possible effect of prior convictions at that point in the proceedings where a warning is critical, that is, before they waived their right to a trial and entered their pleas of guilty. Since the failure to warn them at some other time could not have prejudiced them in any way, it furnishes no basis for vacating their convictions. The warning is not an empty ritual to be recited regardless of whether it has any meaning. It is designed to serve a specific purpose, and that purpose was fulfilled in each of the present cases.
The order appealed from in each of these cases should be affirmed.
Orders affirmed.
NOTES
[1]  Section 335-b read, in more detail, as follows: "Except in a case governed by section three hundred thirty-five-a of this code, where the crime or offense with which defendant is charged or to which he pleads guilty is one for which a different or additional punishment is prescribed or expressly authorized by reason of the fact that the defendant has previously been convicted of a crime or offense, the court upon the arraignment of the defendant and before accepting a plea must inform the defendant that if he has previously been so convicted that fact may be established after his conviction or plea of guilty in the action before the court and he will be subject to such different or additional punishment." (Emphasis supplied.) In 1963 the section was amended to require only that the warning be given "before accepting a plea of guilty" (Code Crim. Pro., § 335-c; see Memorandum of the Governor, April 23, 1963, upon approving L. 1963, ch. 578, N. Y. Legis. Annual, 1963, p. 457).
