Revision: 16125
http://sourceforge.net/p/edk2/code/16125
Author: darylm503
Date: 2014-09-17 20:58:16 +0000 (Wed, 17 Sep 2014)
Log Message:
-----------
StdLib: Fix parameter type errors.
Fix casts of parameters to sprintf() so that they have the correct type.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Stefan Kaeser <[email protected]>
Reviewed-by: [email protected]
Modified Paths:
--------------
trunk/edk2/StdLib/BsdSocketLib/ns_print.c
trunk/edk2/StdLib/BsdSocketLib/res_debug.c
Modified: trunk/edk2/StdLib/BsdSocketLib/ns_print.c
===================================================================
--- trunk/edk2/StdLib/BsdSocketLib/ns_print.c 2014-09-17 08:47:01 UTC (rev
16124)
+++ trunk/edk2/StdLib/BsdSocketLib/ns_print.c 2014-09-17 20:58:16 UTC (rev
16125)
@@ -228,7 +228,7 @@
/* Serial number. */
t = ns_get32(rdata); rdata += NS_INT32SZ;
T(addstr("\t\t\t\t\t", 5, &buf, &buflen));
- len = SPRINTF((tmp, "%lu", t));
+ len = SPRINTF((tmp, "%lu", (unsigned long)t));
T(addstr(tmp, len, &buf, &buflen));
T(spaced = addtab(len, 16, spaced, &buf, &buflen));
T(addstr("; serial\n", 9, &buf, &buflen));
@@ -517,7 +517,7 @@
labels = *rdata++;
t = ns_get32(rdata); rdata += NS_INT32SZ;
len = SPRINTF((tmp, " %s %d %lu ",
- p_type((int)type), (int)algorithm, t));
+ p_type((int)type), (int)algorithm, (unsigned long)t));
T(addstr(tmp, len, &buf, &buflen));
if (labels != (u_int)dn_count_labels(name))
goto formerr;
Modified: trunk/edk2/StdLib/BsdSocketLib/res_debug.c
===================================================================
--- trunk/edk2/StdLib/BsdSocketLib/res_debug.c 2014-09-17 08:47:01 UTC (rev
16124)
+++ trunk/edk2/StdLib/BsdSocketLib/res_debug.c 2014-09-17 20:58:16 UTC (rev
16125)
@@ -536,7 +536,7 @@
case RES_DNSRCH: return "dnsrch";
case RES_INSECURE1: return "insecure1";
case RES_INSECURE2: return "insecure2";
- default: sprintf(nbuf, "?0x%lx?", (u_long)option);
+ default: sprintf(nbuf, "?0x%lx?", (unsigned long)option);
return (nbuf);
}
}
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits