]> git.saurik.com Git - apple/security.git/blobdiff - libsecurity_cdsa_utilities/lib/context.h
Security-55471.14.8.tar.gz
[apple/security.git] / libsecurity_cdsa_utilities / lib / context.h
index 5fdd972593e4089aa36d56968b57a6dd3e0a2c7c..0df2e5bd0e211db1b88d999131159b5349b9c67f 100644 (file)
@@ -74,7 +74,7 @@ public:
             AttributeType = typ;
                        // attribute component pointers are stupidly non-const; allow const input
             Attribute.String = const_cast<char *>(reinterpret_cast<const char *>(&value));
             AttributeType = typ;
                        // attribute component pointers are stupidly non-const; allow const input
             Attribute.String = const_cast<char *>(reinterpret_cast<const char *>(&value));
-            AttributeLength = size ? size : sizeof(T);
+            AttributeLength = (uint32_t) (size ? size : sizeof(T));
         }
 
         Attr(CSSM_ATTRIBUTE_TYPE typ, uint32 value)
         }
 
         Attr(CSSM_ATTRIBUTE_TYPE typ, uint32 value)
@@ -339,7 +339,7 @@ public:
             assert(slot < slotCount);                  // check overflow
             Attr &attribute = attributes[slot++];
             attribute.AttributeType = type;
             assert(slot < slotCount);                  // check overflow
             Attr &attribute = attributes[slot++];
             attribute.AttributeType = type;
-            attribute.AttributeLength = size(p); //@@@ needed? how/when/what for?
+            attribute.AttributeLength =  (uint32)size(p); //@@@ needed? how/when/what for?
             T *tmp = const_cast<T *>(p);
             attribute = walk(copier, tmp);
         }
             T *tmp = const_cast<T *>(p);
             attribute = walk(copier, tmp);
         }