
275 N.W.2d 304 (1979)
ST. PAUL FIRE AND MARINE INSURANCE COMPANY, Plaintiff and Appellant,
v.
AMERADA HESS CORPORATION, Defendant and Appellee.
Civ. No. 9532.
Supreme Court of North Dakota.
February 1, 1979.
Rehearing Denied February 23, 1979.
*305 Zuger & Bucklin, Bismarck, for plaintiff and appellant; argued by William P. Zuger, Bismarck.
Pearce, Anderson, Thames & Durick, Bismarck, for defendant and appellee; argued by B. Timothy Durick, Bismarck.
PEDERSON, Justice.
St. Paul Fire and Marine Insurance Company appeals from a summary judgment in favor of Amerada Hess Corporation. St. *306 Paul Company, as subrogee of KBM Well Service, Inc., sought to recover from Amerada for damages to a well service derrick owned by KBM. The derrick was insured by St. Paul Company, which paid KBM $46,250.00 for damages to the derrick.[1] The district court held that St. Paul Company was not entitled to recover because of a "waiver of negligence" provision contained in the well service contract between Amerada and KBM. We reverse.
The facts surrounding the extensive damaging of the derrick were stipulated. Amerada owns and operates an oil well near New Town that KBM repaired pursuant to a printed-form contract drafted by Amerada. In repairing the oil well, KBM erected a large service derrick over the well hole. The derrick was secured to the ground by four steel "deadmen" anchors furnished and maintained by Amerada. KBM attached the derrick to each of the deadmen with a cable and a steel clamp.
On January 10, 1975, KBM completed its repairs to the oil well and was given permission by Amerada to remove the derrick and its other equipment from the well site. The following morning an Amerada employee discovered that the derrick had been blown over by high winds during the night. There were no eyewitnesses to the accident. An investigation undertaken by employees of both Amerada and KBM disclosed that one of the deadmen was broken and one of the cables securing the derrick to another of the deadmen had slipped through its clamp.
St. Paul Company alleged in its complaint that the failure of Amerada to maintain the deadmen was the proximate cause of the damaging of the derrick and that there were constructional defects in the deadmen that should have been discovered by Amerada. St. Paul Company further asserted that Amerada had a duty to warn KBM, its business invitee, of any defects in the deadmen. Finally, St. Paul Company alleged that Amerada breached its express warranty to KBM that it would provide equipment to repair the well in a "good and workmanlike manner."
The purpose of summary judgment under Rule 56, NDRCivP, is to allow a prompt disposition of a controversy without trial when the salient facts are not disputed or when there is only a question of law involved. Zuraff v. Empire Fire & Marine Ins. Co., 252 N.W.2d 302, 307 (N.D.1977). In granting summary judgment, the court may consider the pleadings, depositions, admissions, affidavits and interrogatories, and the inferences to be drawn therefrom. Albers v. NoDak Racing Club, Inc., 256 N.W.2d 355, 358 (N.D.1977). A motion for summary judgment should be granted only if, (1) after considering the evidence in the light most favorable to the party against whom the judgment is demanded, there is no genuine issue of any material fact, and (2) the moving party is entitled to a judgment as a matter of law. Perdue v. Knudson, 179 N.W.2d 416, 420 (N.D.1970); Rule 56(c), NDRCivP.
The district court based its order for summary judgment on paragraph 4 of the contract which it labeled a "waiver of negligence":
"Amerada shall never be liable for any loss of or damage to any such machinery, equipment or tools furnished by . . . [KBM Well Service], other than uninsured tools lost or damaged down a well hole."
In concluding that the above language precluded St. Paul Company from asserting liability for damages on any theory against Amerada, the district court failed to adequately consider what appears to be an express warranty provision contained in the same paragraph:
"Amerada will furnish, with due diligence and in a good and workmanlike manner, such labor, machinery, equipment, tools, transportation and other items as Amerada specifically agrees to furnish."
*307 As one of its grounds for appeal, St. Paul Company alleges that summary judgment was improperly granted because the provision purporting to waive all liability on the part of Amerada does not bar recovery by St. Paul Company on a contractual theory of breach of warranty. We agree.
Ordinarily the construction of a contract to determine its legal effect is a question of law for the court. Person v. Hass, 273 N.W.2d 710 (N.D.1979). In construing the terms of a contract, the contract should be considered as a whole, "and every clause, sentence or provision, should be given effect consistent with the main purpose of the contract." Delzer Construction Company v. New Marian Homes Corporation, 117 N.W.2d 851, 856 (N.D.1962). See also § 9-07-06, NDCC.
The initial issue is whether the sentence providing that Amerada will furnish its equipment in a "good and workmanlike manner" is an express warranty. An express warranty has been defined as:
". . . an assurance by one party to a contract of the existence of a fact upon which the other party may rely. It is intended to relieve the promisee of any duty to ascertain the fact for himself, and amounts to a promise to indemnify the promisee for any loss if the fact warranted proves untrue. . . . It is an agreement which refers to the subject matter of the contract, but which is collateral to its main purpose, not being an essential part of it, either from the nature of the case or the agreement of the parties." 17A C.J.S. Contracts, § 342, at 325. See also Dittman v. Nagel, 43 Wis.2d 155, 168 N.W.2d 190, 193 (1969).
In an action for breach of contract for the construction of a house, our court held that contractual language providing that the house builder will supply materials "of top quality . . . to do a proficient workmanlike job" is an express warranty. Dobler v. Malloy, 214 N.W.2d 510, 517 (N.D. 1973).
We hold that the express promise on the part of Amerada to provide equipment in a "good and workmanlike manner" is an express warranty. Although the district court made no finding thereon, the word "equipment" necessarily includes any materials, including the deadmen, furnished by Amerada to facilitate KBM's repair function.
The second issue is whether the "waiver of negligence" bars an action against Amerada for breach of warranty. Amerada asserts that the obvious intent of the waiver is to require each party to supply and to pay for damages to their own equipment regardless of the liability of either party for negligence or breach of warranty. St. Paul Company asserts, on the other hand, that the waiver should be interpreted to mean that each party shall replace its own equipment lost or broken as a result of its own negligence only.
When a contractual term is in dispute, a factual question is raised for the court, and this issue should be decided in a manner consistent with the other terms of the contract admitted by the parties. Dangerfield v. Markel, 252 N.W.2d 184, 190 (N.D.1977).
Here, the waiver cannot be construed to exonerate Amerada from all liability. The gist of an action in tort is the breach of a duty imposed by law. See Appeal of Roadmix Const. Corporation, 143 Neb. 425, 9 N.W.2d 741, 745 (1943). The gist of an action on an express warranty in contract is the breach of a promise contained therein.
In construing the contract most favorably to St. Paul Company, we conclude that the parties intended the waiver as a limitation on recovery of damages from Amerada arising out of negligence alone. To interpret the waiver as a complete bar to recovery would mean that the warranty is a superfluous addition to the contract that allows no remedy for the other party in the event Amerada fails to provide equipment in a workmanlike manner. This court will not assume that the parties agreed to a warranty of quality that has no legal effect.
*308 The third issue involves the scope of paragraph 7 of the contract entitled "INSURANCE AND INDEMNITY."[2] This provision provides in part:
". . . [KBM Well Service] shall protect and defend Amerada against and indemnify and save it harmless from all liability, claims, demands and causes of action arising out of the execution and performance of work under this agreement. This indemnity agreement by. . . [KBM Well Service] shall be insured by . . . [KBM Well Service] with insurers and in amounts satisfactory to Amerada, . . ." [Emphasis added.]
Amerada contends that this indemnity provision, along with the waiver, is a promise by KBM to hold Amerada harmless from any liability under the contract. The term "save harmless" has been defined as a "guaranty" or promise to "indemnify." See Bausman v. Credit Guarantee Co., 47 Minn. 377, 379, 50 N.W. 496 (1891). A reasonable interpretation of the "save harmless" provision contained in paragraph 7 is that KBM agrees to "protect" and "defend" Amerada from claims of third parties. The save-harmless provision does not shield Amerada from contract claims of KBM but, instead, assures to Amerada that KBM will defend Amerada from third-party claims. The requirement that KBM obtain property insurance in amounts satisfactory to Amerada provides further assurance to Amerada of indemnity from KBM in the event an action is brought against Amerada for the negligent acts of either or both Amerada and KBM.
Amerada argues that, because the insurance provision contained in paragraph 7 of the well service contract obligates KBM to carry property insurance containing a "waiver of subrogation" clause, St. Paul Company is precluded from bringing an action for indemnity against Amerada. Amerada admits that KBM did not procure a "waiver of subrogation" clause against Amerada in its insurance policy with St. Paul Company. Although there is nothing in the record to indicate that St. Paul Company was informed of any waiver of subrogation terms in the contract between Amerada and KBM, Amerada asserts, nevertheless, that St. Paul Company is bound by KBM's promise to obtain a waiver of subrogation clause because St. Paul Company, as subrogee, can have no greater rights under the contract than its principal, KBM.
Subrogation is an equitable remedy that provides for an adjustment between the parties to secure the ultimate discharge of a debt by the person who, in equity and good conscience, ought to pay for it. See National Garment Co. v. New York C. & St. L. R. Co., 173 F.2d 32, 37 (8th Cir. 1949); State Farm Mutual Automobile Ins. Co. v. Wee, 196 N.W.2d 54, 59 (N.D. 1971). Ordinarily, the subrogee does not waive any right to institute an action for indemnity absent an express waiver of this right. See Pettengill v. New Hampshire Insurance Company, 129 Vt. 23, 270 A.2d 883, 888 (1970). A waiver of the right of subrogation must be by an act of the subrogee; it cannot be contracted away by the conduct or agreement of third parties. See 83 C.J.S. Subrogation, § 13, at 610.
Here, the equities are clearly in St. Paul Company's favor. St. Paul Company, as subrogee, did not consent to the waiver of subrogation allegedly entered into by the parties, nor did St. Paul Company otherwise forfeit its right to bring an action against Amerada. St. Paul Company cannot be held to the terms of an agreement to waive subrogation to which it was not a party. Any attempt by Amerada and KBM to limit St. Paul Company's right of subrogation on its payment of KBM's insurance claim is a nullity. The insurance and indemnity provisions of the contract do not prevent an action by St. Paul Company, as subrogee of KBM.
*309 KBM was, originally, a third-party defendant in this lawsuit. The district court dismissed KBM on the basis of a document entitled "RELEASE OF ALL CLAIMS." Amerada asserts that this release must be interpreted as a settlement of any claim that either party has against the other and, therefore, St. Paul Company, as subrogee of KBM, is estopped from asserting its claim.
The release reads in part:
"It is agreed and understood that this settlement is a compromise of a doubtful and disputed claim and that the payment of the consideration expressed is not to be construed as an admission of liability on behalf of the party or parties released or to be considered or construed as a waiver by, or an estoppel against, any of the parties herein released to make claim for any damage which they sustained, such claim or claims and causes of actions with respect thereto being expressly reserved to them." [Emphasis added.]
By its very terms the release does not forfeit KBM's right to bring an action against Amerada. It unequivocally reserves the right of KBM to pursue any claims it may have in this lawsuit. The release does not, therefore, affect the right of KBM's subrogee, St. Paul Company, from initiating an action for its claim on the theory of breach of warranty.
For the reasons set forth in this opinion, we conclude that summary judgment was properly granted insofar as the waiver provision bars recovery by St. Paul Company for negligence and other tortious conduct. We conclude that the waiver provision does not preclude an action against Amerada for breach of warranty. The judgment dismissing the action is reversed.
ERICKSTAD, C. J., and PAULSON, SAND and VANDE WALLE, JJ., concur.
NOTES
[1]  KBM was a third-party defendant but was thereafter dismissed from this lawsuit. That dismissal is not challenged.
[2]  In 1960, Amerada proposed to KBM an amendment to paragraph 7. This amendment contains a substantially identical "save harmless" provision to the one originally agreed to by the parties. It narrows KBM's liability for any cause of action by third parties due to damage or loss attributable solely to Amerada. The record does not indicate whether KBM agreed to this amendment.
