Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Lustrec - public version
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LustreC
Lustrec - public version
Commits
e14af00f
Commit
e14af00f
authored
2 years ago
by
BRUN Lelio
Browse files
Options
Downloads
Patches
Plain Diff
fix warning formatting
parent
efe183bc
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/error.ml
+1
-1
1 addition, 1 deletion
src/error.ml
src/scheduling.ml
+5
-6
5 additions, 6 deletions
src/scheduling.ml
src/utils/location.ml
+3
-1
3 additions, 1 deletion
src/utils/location.ml
with
9 additions
and
8 deletions
src/error.ml
+
1
−
1
View file @
e14af00f
...
@@ -71,7 +71,7 @@ let pp fmt = function
...
@@ -71,7 +71,7 @@ let pp fmt = function
fprintf
fmt
"Load error: %s.@."
l
fprintf
fmt
"Load error: %s.@."
l
let
pp_warning
loc
pp_msg
=
let
pp_warning
loc
pp_msg
=
Format
.
eprintf
"@
?%a
Warning: %t@
.
"
Location
.
pp
loc
pp_msg
Format
.
eprintf
"@
,@[<v>%a@,
Warning: %t@
]@,
"
Location
.
pp
loc
pp_msg
let
pp_error
loc
pp_msg
=
let
pp_error
loc
pp_msg
=
Format
.
eprintf
"@?%aError: @[<v 0>%t@]@."
Location
.
pp
loc
pp_msg
Format
.
eprintf
"@?%aError: @[<v 0>%t@]@."
Location
.
pp
loc
pp_msg
This diff is collapsed.
Click to expand it.
src/scheduling.ml
+
5
−
6
View file @
e14af00f
...
@@ -391,12 +391,11 @@ let pp_warning_unused fmt node_schs =
...
@@ -391,12 +391,11 @@ let pp_warning_unused fmt node_schs =
(
fun
u
->
(
fun
u
->
let
vu
=
get_node_var
u
nd
in
let
vu
=
get_node_var
u
nd
in
if
vu
.
var_orig
then
if
vu
.
var_orig
then
Format
.
fprintf
Error
.
pp_warning
vu
.
var_loc
fmt
(
fun
fmt
->
" %a Warning: variable '%s' seems unused@,"
Format
.
fprintf
Location
.
pp
fmt
vu
.
var_loc
"variable '%s' seems unused"
u
))
u
)
unused
)
unused
)
node_schs
node_schs
...
...
This diff is collapsed.
Click to expand it.
src/utils/location.ml
+
3
−
1
View file @
e14af00f
...
@@ -45,7 +45,9 @@ let shift_pos pos1 pos2 =
...
@@ -45,7 +45,9 @@ let shift_pos pos1 pos2 =
}
}
let
line_of
(
s
,
_e
)
=
s
.
pos_lnum
let
line_of
(
s
,
_e
)
=
s
.
pos_lnum
let
pp
fmt
loc
=
Format
.
fprintf
fmt
"%s"
(
Lex
.
range
loc
)
let
pp
fmt
loc
=
let
s
=
Lex
.
range
loc
in
Format
.
fprintf
fmt
"%s"
String
.(
sub
s
0
(
length
s
-
1
))
let
pp_c
fmt
(
s
,
_e
)
=
let
pp_c
fmt
(
s
,
_e
)
=
let
filename
=
s
.
pos_fname
in
let
filename
=
s
.
pos_fname
in
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment