Skip to content

Commit

Permalink
CHT: fix some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sipma committed Jan 16, 2024
1 parent c339e8a commit 1ebd7f2
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 74 deletions.
4 changes: 4 additions & 0 deletions CodeHawk/CHB/bchlibpe/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
(libraries bchlib chlib chutil extlib str)
(public_name codehawk.bchlibpe)
(wrapped false))

(env
(dev
(flags (:standard -warn-error -A))))
4 changes: 4 additions & 0 deletions CodeHawk/CHB/bchlibx86/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
(libraries bchlib bchlibpe bchlibelf chlib chutil extlib xprlib zarith)
(public_name codehawk.bchlibx86)
(wrapped false))

(env
(dev
(flags (:standard -warn-error -A))))
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
------------------------------------------------------------------------------
The MIT License (MIT)
Copyright (c) 2023 Aarno Labs LLC
Copyright (c) 2023-2024 Aarno Labs LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -25,18 +25,3 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
============================================================================= *)

(* chlib *)
open CHLanguage
open CHPretty

(* bchlib *)
open BCHByteUtilities
open BCHDoubleword
open BCHFloc
open BCHFunctionData
open BCHFunctionInfo
open BCHLibTypes
open BCHLocation
open BCHStreamWrapper
open BCHSystemInfo
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
------------------------------------------------------------------------------
The MIT License (MIT)
Copyright (c) 2023 Aarno Labs LLC
Copyright (c) 2023-2024 Aarno Labs LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -25,12 +25,3 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
============================================================================= *)

(* chlib *)
open CHLanguage

(* xprlib *)
open XprTypes

(* bchlib *)
open BCHLibTypes
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
(* =============================================================================
CodeHawk Unit Testing Framework
CodeHawk Unit Testing Framework
Author: Henny Sipma
Adapted from: Kaputt (https://kaputt.x9c.fr/index.html)
------------------------------------------------------------------------------
The MIT License (MIT)
Copyright (c) 2005-2019 Kestrel Technology LLC
Copyright (c) 2020-2021 Henny Sipma
Copyright (c) 2022 Aarno Labs LLC
Copyright (c) 2020-2021 Henny B. Sipma
Copyright (c) 2022-2024 Aarno Labs LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand All @@ -28,8 +28,6 @@
SOFTWARE.
============================================================================= *)

(* tchlib *)
open TCHTestApi

(* xprlib *)
open XprTypes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
(* =============================================================================
CodeHawk Unit Testing Framework
CodeHawk Unit Testing Framework
Author: Henny Sipma
Adapted from: Kaputt (https://kaputt.x9c.fr/index.html)
------------------------------------------------------------------------------
The MIT License (MIT)
Copyright (c) 2005-2019 Kestrel Technology LLC
Copyright (c) 2020-2021 Henny Sipma
Copyright (c) 2022-2023 Aarno Labs LLC
Copyright (c) 2020-2021 Henny B. Sipma
Copyright (c) 2022-2024 Aarno Labs LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand All @@ -28,8 +28,6 @@
SOFTWARE.
============================================================================= *)

(* xprlib *)
open XprTypes

(* chlib *)
open CHLanguage
Expand Down
15 changes: 6 additions & 9 deletions CodeHawk/CHT/tchlib/tCHAssertion.ml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
(* =============================================================================
CodeHawk Unit Testing Framework
CodeHawk Unit Testing Framework
Author: Henny Sipma
Adapted from: Kaputt (https://kaputt.x9c.fr/index.html)
------------------------------------------------------------------------------
The MIT License (MIT)
Copyright (c) 2005-2019 Kestrel Technology LLC
Copyright (c) 2020-2021 Henny Sipma
Copyright (c) 2022-2023 Aarno Labs LLC
Copyright (c) 2020-2021 Henny B. Sipma
Copyright (c) 2022-2024 Aarno Labs LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand All @@ -31,9 +31,6 @@
(* tchlib *)
open TCHTestApi

(* chlib *)
open CHPretty

module U = TCHUtils

exception Failed of failure_t
Expand Down
23 changes: 12 additions & 11 deletions CodeHawk/CHT/tchlib/tCHAssertion.mli
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
(* =============================================================================
CodeHawk Unit Testing Framework
CodeHawk Unit Testing Framework
Author: Henny Sipma
Adapted from: Kaputt (https://kaputt.x9c.fr/index.html)
------------------------------------------------------------------------------
The MIT License (MIT)
Copyright (c) 2005-2019 Kestrel Technology LLC
Copyright (c) 2020-2021 Henny Sipma
Copyright (c) 2022-2023 Aarno Labs LLC
Copyright (c) 2020-2021 Henny B. Sipma
Copyright (c) 2022-2024 Aarno Labs LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand All @@ -39,7 +39,7 @@ exception Failed of failure_t


(** Raises [Failed] with the passed parameters
(expected value, actual value, and message). *)
(expected value, actual value, and message). *)
val fail: string -> string -> string -> 'a

(** [fail_msg m] is equivalent to [fail "" "" m]. *)
Expand All @@ -51,10 +51,10 @@ val default_printer: 'a -> string


(** [equal ~eq:e ~prn:p ~msg:m x y] raises [Failed] if [x] and [y] are not equal,
relative to the equality function [e]. [p] is used to convert [x] and [y]
relative to the equality function [e]. [p] is used to convert [x] and [y]
into strings (used only upon failure), and [m] is the message associated with
the assertion.
Default parameter values:
- [e] defaults to [(=)]
- [p] defaults to [default_printer];
Expand All @@ -68,7 +68,7 @@ val equal:
-> 'a
-> unit


val not_equal:
?eq:('a -> 'a -> bool)
-> ?prn:('a -> string)
Expand Down Expand Up @@ -99,7 +99,8 @@ val make_equal_list:
val equal_string: ?msg:string -> string -> string -> unit


(* [raise ~msg:m f] raise [Failed] if [f ()] evaluates without raising an exception *)
(** [raise ~msg:m f] raise [Failed] if [f ()] evaluates without raising an
exception *)
val raises: ?msg:string -> (unit -> 'a) -> unit


Expand Down
12 changes: 6 additions & 6 deletions CodeHawk/CHT/tchlib/tCHUtils.ml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
(* =============================================================================
CodeHawk Unit Testing Framework
CodeHawk Unit Testing Framework
Author: Henny Sipma
Adapted from: Kaputt (https://kaputt.x9c.fr/index.html)
------------------------------------------------------------------------------
The MIT License (MIT)
Copyright (c) 2005-2019 Kestrel Technology LLC
Copyright (c) 2020-2021 Henny Sipma
Copyright (c) 2022 Aarno Labs LLC
Copyright (c) 2020-2021 Henny B. Sipma
Copyright (c) 2022-2024 Aarno Labs LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand Down
14 changes: 8 additions & 6 deletions CodeHawk/CHT/tchlib/tCHUtils.mli
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
(* =============================================================================
CodeHawk Unit Testing Framework
CodeHawk Unit Testing Framework
Author: Henny Sipma
Adapted from: Kaputt (https://kaputt.x9c.fr/index.html)
------------------------------------------------------------------------------
The MIT License (MIT)
Copyright (c) 2005-2019 Kestrel Technology LLC
Copyright (c) 2020-2021 Henny Sipma
Copyright (c) 2022 Aarno Labs LLC
Copyright (c) 2020-2021 Henny B. Sipma
Copyright (c) 2022-2024 Aarno Labs LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand All @@ -38,6 +38,8 @@ val string_of_string: string -> string

val string_of_bytes: bytes -> string

val string_of_buffer: Buffer.t -> string

val make_string_of_list: ('a -> string) -> 'a list -> string

val make_string_of_option: ('a -> string) -> 'a option -> string
Expand Down

0 comments on commit 1ebd7f2

Please sign in to comment.