Skip to content

Commit 3f1d939

Browse files
committed
Upgrade gnatprove to version 15
- Remove no longer needed workaround
1 parent c98ed56 commit 3f1d939

6 files changed

Lines changed: 7 additions & 33 deletions

File tree

alire.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ website = "https://github.com/mgrojo/coap_spark"
2323
tags = ["spark", "coap", "iot", "protocol"]
2424

2525
[[depends-on]]
26-
gnatprove = "^14.1.1"
26+
gnat_native = "^15"
27+
gnatprove = "^15"
2728

2829
[build-switches]
2930
"*".Style_Checks = [
@@ -65,6 +66,3 @@ wolfssl = { path='libs/wolfssl/wrapper/Ada' }
6566
# This is needed only for compatibility with https://github.com/mgrojo/ikea-smartlight
6667
# You can set it to false, if you need to disable it.
6768
wolfssl.STATIC_PSK = true
68-
69-
[[depends-on]]
70-
gnat_native = "^14.2"

client/src/coap_client.adb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ with RFLX.RFLX_Types;
2424
-- explained in the package itself (related to the use of SPARK).
2525
with SPARK_Terminal;
2626

27-
with Workarounds;
28-
2927
procedure CoAP_Client is
3028
package FSM renames RFLX.CoAP_Client.Session.FSM;
3129
package Session_Environment renames RFLX.CoAP_Client.Session_Environment;
@@ -373,7 +371,4 @@ begin
373371

374372
RFLX.RFLX_Types.Free (Payload);
375373

376-
-- This has no effect, but it is needed to avoid a linking error with
377-
-- SPARKLib in the validation profile.
378-
Workarounds.Check_Or_Fail;
379374
end CoAP_Client;

client/src/workarounds.adb

Lines changed: 0 additions & 8 deletions
This file was deleted.

client/src/workarounds.ads

Lines changed: 0 additions & 12 deletions
This file was deleted.

server/src/server_handling.adb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ is
99
Response_Codes : out CoAP_SPARK.Messages.Response_Kind;
1010
Response_Content : out CoAP_SPARK.Messages.Content)
1111
is
12+
pragma Unreferenced (Request_Content);
1213
begin
1314
-- Handle the request based on the method and content.
1415
case Method is

sparklib.gpr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
project SPARKlib extends "sparklib_external" is
1+
project SPARKlib extends "sparklib_internal" is
22

33
-- Based on the SPARKlib project file from the Alire gnatprove crate, which
44
-- has this notice:
@@ -12,10 +12,10 @@ project SPARKlib extends "sparklib_external" is
1212

1313
for Object_Dir use "obj/sparklib";
1414

15-
for Source_Dirs use SPARKlib_External'Source_Dirs;
15+
for Source_Dirs use SPARKlib_Internal'Source_Dirs;
1616

1717
Ada_Compiler_Switches :=
18-
Sparklib_External.Compiler'Default_Switches ("Ada") & (
18+
Sparklib_Internal.Compiler'Default_Switches ("Ada") & (
1919
"-ffunction-sections" -- Separate ELF section for each function
2020
,"-fdata-sections" -- Separate ELF section for each variable
2121
);
@@ -24,7 +24,7 @@ project SPARKlib extends "sparklib_external" is
2424
for Default_Switches ("Ada") use Ada_Compiler_Switches;
2525
end Compiler;
2626

27-
for Excluded_Source_Files use SPARKlib_External'Excluded_Source_Files
27+
for Excluded_Source_Files use SPARKlib_Internal'Excluded_Source_Files
2828
& (
2929
-- Uncomment the files you want to exclude from your project
3030
-- "spark-big_integers.ads",

0 commit comments

Comments
 (0)