[PATCH] D99420: [NFC][OCaml] Resolve a couple more compilation warnings
Josh Berdine via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 26 09:27:46 PDT 2021
jberdine created this revision.
Herald added a reviewer: whitequark.
jberdine requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Followup to: 0b1dc49ca38a <https://reviews.llvm.org/rG0b1dc49ca38a8569b0aee40ea8d3054bc960e2ed> [NFC][OCaml] Resolve const and unsigned compilation warnings
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D99420
Files:
llvm/bindings/ocaml/llvm/llvm_ocaml.c
llvm/bindings/ocaml/target/target_ocaml.c
Index: llvm/bindings/ocaml/target/target_ocaml.c
===================================================================
--- llvm/bindings/ocaml/target/target_ocaml.c
+++ llvm/bindings/ocaml/target/target_ocaml.c
@@ -314,8 +314,8 @@
char *ErrorMessage;
if(LLVMTargetMachineEmitToFile(TargetMachine_val(Machine), Module,
- String_val(FileName), Int_val(FileType),
- &ErrorMessage)) {
+ (char *)String_val(FileName),
+ Int_val(FileType), &ErrorMessage)) {
llvm_raise(*caml_named_value("Llvm_target.Error"), ErrorMessage);
}
Index: llvm/bindings/ocaml/llvm/llvm_ocaml.c
===================================================================
--- llvm/bindings/ocaml/llvm/llvm_ocaml.c
+++ llvm/bindings/ocaml/llvm/llvm_ocaml.c
@@ -885,7 +885,7 @@
/* llvalue -> string option */
CAMLprim value llvm_get_mdstring(LLVMValueRef V) {
- size_t Len;
+ unsigned Len;
const char *CStr = LLVMGetMDString(V, &Len);
return cstr_to_string_option(CStr, Len);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99420.333567.patch
Type: text/x-patch
Size: 1094 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210326/ab80a0b2/attachment.bin>
More information about the llvm-commits
mailing list