Skip to content

Commit 426e2fa

Browse files
committed
fixed some minor standards warnings from the Intel compiler on Windows.
updated the visual studio solution to VS 2013. removed the test projects (it now just compiles the library).
1 parent 8fb4137 commit 426e2fa

15 files changed

+111
-453
lines changed

src/json_module.F90

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,21 @@ module json_module
259259
!
260260
! The types of JSON data.
261261
!
262-
integer(IK),parameter,public :: json_unknown = 0 !! Unknown JSON data type (see [[json_file_variable_info]] and [[json_info]])
263-
integer(IK),parameter,public :: json_null = 1 !! Null JSON data type (see [[json_file_variable_info]] and [[json_info]])
264-
integer(IK),parameter,public :: json_object = 2 !! Object JSON data type (see [[json_file_variable_info]] and [[json_info]])
265-
integer(IK),parameter,public :: json_array = 3 !! Array JSON data type (see [[json_file_variable_info]] and [[json_info]])
266-
integer(IK),parameter,public :: json_logical = 4 !! Logical JSON data type (see [[json_file_variable_info]] and [[json_info]])
267-
integer(IK),parameter,public :: json_integer = 5 !! Integer JSON data type (see [[json_file_variable_info]] and [[json_info]])
268-
integer(IK),parameter,public :: json_double = 6 !! Double JSON data type (see [[json_file_variable_info]] and [[json_info]])
269-
integer(IK),parameter,public :: json_string = 7 !! String JSON data type (see [[json_file_variable_info]] and [[json_info]])
262+
integer(IK),parameter,public :: json_unknown = 0 !! Unknown JSON data type
263+
!! (see [[json_file_variable_info]] and [[json_info]])
264+
integer(IK),parameter,public :: json_null = 1 !! Null JSON data type
265+
!! (see [[json_file_variable_info]] and [[json_info]])
266+
integer(IK),parameter,public :: json_object = 2 !! Object JSON data type
267+
!! (see [[json_file_variable_info]] and [[json_info]])
268+
integer(IK),parameter,public :: json_array = 3 !! Array JSON data type
269+
!! (see [[json_file_variable_info]] and [[json_info]])
270+
integer(IK),parameter,public :: json_logical = 4 !! Logical JSON data type
271+
!! (see [[json_file_variable_info]] and [[json_info]])
272+
integer(IK),parameter,public :: json_integer = 5 !! Integer JSON data type
273+
!! (see [[json_file_variable_info]] and [[json_info]])
274+
integer(IK),parameter,public :: json_double = 6 !! Double JSON data type
275+
!! (see [[json_file_variable_info]] and [[json_info]])
276+
integer(IK),parameter,public :: json_string = 7 !! String JSON data type
270277
!*********************************************************
271278

272279
!*********************************************************
@@ -916,8 +923,9 @@ end subroutine traverse_callback_func
916923
!
917924

918925
!exception handling [private variables]
919-
logical(LK) :: is_verbose = .false. !! if true, all exceptions are immediately printed to console
920-
logical(LK) :: exception_thrown = .true. !! the error flag (by default, this is true to make sure that [[json_initialize]] is called.
926+
logical(LK) :: is_verbose = .false. !! if true, all exceptions are immediately printed to console
927+
logical(LK) :: exception_thrown = .true. !! the error flag (by default, this is true to
928+
!! make sure that [[json_initialize]] is called.
921929
character(kind=CK,len=:),allocatable :: err_message !! the error message
922930

923931
!temp vars used when parsing lines in file [private variables]
@@ -1668,10 +1676,10 @@ subroutine json_initialize(verbose,compact_reals,print_signs,real_format)
16681676

16691677
implicit none
16701678

1671-
logical(LK),intent(in),optional :: verbose !! mainly useful for debugging (default is false)
1672-
logical(LK),intent(in),optional :: compact_reals !! to compact the real number strings for output (default is true)
1673-
logical(LK),intent(in),optional :: print_signs !! always print numeric sign (default is false)
1674-
character(len=*,kind=CDK),intent(in),optional :: real_format !! exponential (default), scientific, engineering or general
1679+
logical(LK),intent(in),optional :: verbose !! mainly useful for debugging (default is false)
1680+
logical(LK),intent(in),optional :: compact_reals !! to compact the real number strings for output (default is true)
1681+
logical(LK),intent(in),optional :: print_signs !! always print numeric sign (default is false)
1682+
character(len=*,kind=CDK),intent(in),optional :: real_format !! exponential (default), scientific, engineering or general
16751683

16761684
character(kind=CDK,len=10) :: w,d,e
16771685
character(kind=CDK,len=2) :: sgn, rl_edit_desc
@@ -3246,7 +3254,7 @@ pure function json_count(me) result(count)
32463254

32473255
count = me%n_children
32483256

3249-
end function json_count
3257+
end function json_count
32503258
!*****************************************************************************************
32513259

32523260
!*****************************************************************************************
@@ -3754,6 +3762,9 @@ subroutine json_get_by_path(me, path, p, found)
37543762

37553763
character(kind=CK,len=1),parameter :: start_array_alt = '('
37563764
character(kind=CK,len=1),parameter :: end_array_alt = ')'
3765+
character(kind=CK,len=1),parameter :: root = '$'
3766+
character(kind=CK,len=1),parameter :: this = '@'
3767+
character(kind=CK,len=1),parameter :: child = '.'
37573768

37583769
integer(IK) :: i,length,child_i
37593770
character(kind=CK,len=1) :: c
@@ -3778,21 +3789,21 @@ subroutine json_get_by_path(me, path, p, found)
37783789
c = path(i:i)
37793790

37803791
select case (c)
3781-
case (CK_'$')
3792+
case (root)
37823793

37833794
! root
37843795
do while (associated (p%parent))
37853796
p => p%parent
37863797
end do
37873798
child_i = i + 1
37883799

3789-
case (CK_'@')
3800+
case (this)
37903801

37913802
! this
37923803
p => me
37933804
child_i = i + 1
37943805

3795-
case (CK_'.')
3806+
case (child)
37963807

37973808
! get child member from p
37983809
if (child_i < i) then

visual_studio/jsonfortran.sln

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2013
4+
VisualStudioVersion = 12.0.40629.0
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "jsonfortran", "jsonfortran.vfproj", "{9A2FEBBE-6702-448E-B361-AE3EA614F5CF}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Win32 = Debug|Win32
11+
Debug|x64 = Debug|x64
12+
Release|Win32 = Release|Win32
13+
Release|x64 = Release|x64
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{9A2FEBBE-6702-448E-B361-AE3EA614F5CF}.Debug|Win32.ActiveCfg = Debug|Win32
17+
{9A2FEBBE-6702-448E-B361-AE3EA614F5CF}.Debug|Win32.Build.0 = Debug|Win32
18+
{9A2FEBBE-6702-448E-B361-AE3EA614F5CF}.Debug|x64.ActiveCfg = Debug|x64
19+
{9A2FEBBE-6702-448E-B361-AE3EA614F5CF}.Debug|x64.Build.0 = Debug|x64
20+
{9A2FEBBE-6702-448E-B361-AE3EA614F5CF}.Release|Win32.ActiveCfg = Release|Win32
21+
{9A2FEBBE-6702-448E-B361-AE3EA614F5CF}.Release|Win32.Build.0 = Release|Win32
22+
{9A2FEBBE-6702-448E-B361-AE3EA614F5CF}.Release|x64.ActiveCfg = Release|x64
23+
{9A2FEBBE-6702-448E-B361-AE3EA614F5CF}.Release|x64.Build.0 = Release|x64
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
EndGlobal

visual_studio/jsonfortran.vfproj

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<VisualStudioProject ProjectType="typeStaticLibrary" ProjectCreator="Intel Fortran" Keyword="Static Library" Version="11.0" ProjectIdGuid="{9A2FEBBE-6702-448E-B361-AE3EA614F5CF}">
3+
<Platforms>
4+
<Platform Name="Win32"/>
5+
<Platform Name="x64"/></Platforms>
6+
<Configurations>
7+
<Configuration Name="Debug|Win32" OutputDirectory="../lib/win32" ConfigurationType="typeStaticLibrary">
8+
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" StandardWarnings="standardWarningsF08" Diagnostics="diagnosticsShowAll" WarnInterfaces="true" ModulePath="$(OutDir)\" Traceback="true" NullPointerCheck="true" BoundsCheck="true" UninitializedVariablesCheck="true" StackFrameCheck="true" RuntimeLibrary="rtMultiThreadedDebugDLL"/>
9+
<Tool Name="VFLibrarianTool"/>
10+
<Tool Name="VFResourceCompilerTool"/>
11+
<Tool Name="VFMidlTool" SuppressStartupBanner="true"/>
12+
<Tool Name="VFCustomBuildTool"/>
13+
<Tool Name="VFPreLinkEventTool"/>
14+
<Tool Name="VFPreBuildEventTool"/>
15+
<Tool Name="VFPostBuildEventTool"/></Configuration>
16+
<Configuration Name="Release|Win32" OutputDirectory="../lib/win32" ConfigurationType="typeStaticLibrary">
17+
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" ModulePath="$(OutDir)\" RuntimeLibrary="rtMultiThreadedDLL"/>
18+
<Tool Name="VFLibrarianTool"/>
19+
<Tool Name="VFResourceCompilerTool"/>
20+
<Tool Name="VFMidlTool" SuppressStartupBanner="true"/>
21+
<Tool Name="VFCustomBuildTool"/>
22+
<Tool Name="VFPreLinkEventTool"/>
23+
<Tool Name="VFPreBuildEventTool"/>
24+
<Tool Name="VFPostBuildEventTool"/></Configuration>
25+
<Configuration Name="Debug|x64" ConfigurationType="typeStaticLibrary">
26+
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" StandardWarnings="standardWarningsF08" Diagnostics="diagnosticsShowAll" WarnDeclarations="true" WarnUnusedVariables="true" WarnIgnoreLOC="true" WarnTruncateSource="true" WarnUncalled="true" WarnInterfaces="true" ModulePath="$(OutDir)\" Traceback="true" NullPointerCheck="true" BoundsCheck="true" UninitializedVariablesCheck="true" StackFrameCheck="true" RuntimeLibrary="rtMultiThreadedDebugDLL"/>
27+
<Tool Name="VFLibrarianTool"/>
28+
<Tool Name="VFResourceCompilerTool"/>
29+
<Tool Name="VFMidlTool" SuppressStartupBanner="true" TargetEnvironment="midlTargetAMD64"/>
30+
<Tool Name="VFCustomBuildTool"/>
31+
<Tool Name="VFPreLinkEventTool"/>
32+
<Tool Name="VFPreBuildEventTool"/>
33+
<Tool Name="VFPostBuildEventTool"/></Configuration>
34+
<Configuration Name="Release|x64" ConfigurationType="typeStaticLibrary">
35+
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" ModulePath="$(OutDir)\" RuntimeLibrary="rtMultiThreadedDLL"/>
36+
<Tool Name="VFLibrarianTool"/>
37+
<Tool Name="VFResourceCompilerTool"/>
38+
<Tool Name="VFMidlTool" SuppressStartupBanner="true" TargetEnvironment="midlTargetAMD64"/>
39+
<Tool Name="VFCustomBuildTool"/>
40+
<Tool Name="VFPreLinkEventTool"/>
41+
<Tool Name="VFPreBuildEventTool"/>
42+
<Tool Name="VFPostBuildEventTool"/></Configuration></Configurations>
43+
<Files>
44+
<Filter Name="src" Filter="F90;f90;for;f;fpp;ftn;def;odl;idl">
45+
<File RelativePath="..\src\json_module.F90">
46+
<FileConfiguration Name="Debug|Win32">
47+
<Tool Name="VFFortranCompilerTool" Preprocess="preprocessYes"/></FileConfiguration>
48+
<FileConfiguration Name="Release|x64">
49+
<Tool Name="VFFortranCompilerTool" Preprocess="preprocessYes"/></FileConfiguration>
50+
<FileConfiguration Name="Debug|x64">
51+
<Tool Name="VFFortranCompilerTool" Preprocess="preprocessYes"/></FileConfiguration>
52+
<FileConfiguration Name="Release|Win32">
53+
<Tool Name="VFFortranCompilerTool" Preprocess="preprocessYes"/></FileConfiguration></File></Filter></Files>
54+
<Globals/></VisualStudioProject>

visual_studio_2010/jsonfortran.sln

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

0 commit comments

Comments
 (0)