@@ -131,7 +131,7 @@ bool is_fortran_intexpr(String *s) {
131131 */
132132int fix_fortran_dims (Node *n, const char *tmap_name, String *typemap) {
133133 String *key = NewStringf (" tmap:%s:checkdim" , tmap_name);
134- bool is_checkdims = GetFlag (n, key);
134+ bool is_checkdims = static_cast < bool >( GetFlag (n, key) );
135135 Delete (key);
136136 if (!is_checkdims)
137137 return SWIG_OK;
@@ -242,7 +242,7 @@ String *make_import_string(String *imtype) {
242242 ++end;
243243
244244 // Create a substring and convert to lowercase
245- String* result = NewStringWithSize (start, end - start);
245+ String* result = NewStringWithSize (start, static_cast < int >( end - start) );
246246 for (char * c = Char (result); *c != ' \0 ' ; ++c)
247247 *c = tolower (*c);
248248
@@ -293,7 +293,7 @@ String *shorten_identifier(String *inp, int maxlen, int warning) {
293293 while (hash > 0 ) {
294294 unsigned long rem = hash % 36 ;
295295 hash = hash / 36 ;
296- *dst-- = (rem < 10 ? ' 0' + rem : (' A' + rem - 10 ));
296+ *dst-- = static_cast < char > (rem < 10 ? ' 0' + rem : (' A' + rem - 10 ));
297297 }
298298
299299 if (warning != WARN_NONE && !Getmeta (inp, " already_warned" )) {
@@ -1072,7 +1072,7 @@ int FORTRAN::moduleDirective(Node *n) {
10721072 * - static functions
10731073 */
10741074int FORTRAN::functionWrapper (Node *n) {
1075- const bool member = GetFlag (n, " fortran:ismember" );
1075+ const bool member = static_cast < bool >( GetFlag (n, " fortran:ismember" ) );
10761076 bool generic = false ;
10771077
10781078 // >>> SET UP WRAPPER NAME
@@ -1292,7 +1292,7 @@ int FORTRAN::functionWrapper(Node *n) {
12921292
12931293 // >>> GENERATE CODE FOR MODULE INTERFACE
12941294
1295- bool fprivate = GetFlag (n, " fortran:private" );
1295+ bool fprivate = static_cast < bool >( GetFlag (n, " fortran:private" ) );
12961296 if (member) {
12971297 // Wrapping a member function
12981298 ASSERT_OR_PRINT_NODE (!this ->is_bindc_struct (), n);
@@ -2396,7 +2396,7 @@ int FORTRAN::classHandler(Node *n) {
23962396 }
23972397 }
23982398
2399- const bool bindc = GetFlag (n, " feature:fortran:bindc" );
2399+ const bool bindc = static_cast < bool >( GetFlag (n, " feature:fortran:bindc" ) );
24002400 if (bindc && base_fsymname) {
24012401 // Disallow inheritance for BIND(C) types
24022402 Swig_error (input_file, line_number,
@@ -3323,7 +3323,7 @@ int FORTRAN::classDirectorDefaultConstructor(Node *n) {
33233323 * - "directorout" converts "ctype" to actual C++ type
33243324 */
33253325int FORTRAN::classDirectorMethod (Node *n, Node *classn, String *super) {
3326- bool ignored = GetFlag (n, " feature:ignore" );
3326+ bool ignored = static_cast < bool >( GetFlag (n, " feature:ignore" ) );
33273327 bool pure_virtual = is_pure_virtual (n);
33283328 if (ignored && !pure_virtual)
33293329 return SWIG_NOWRAP;
@@ -3563,9 +3563,9 @@ int FORTRAN::classDirectorMethod(Node *n, Node *classn, String *super) {
35633563
35643564 // Create local variables that become arguments to fortran
35653565 {
3566- String *cdecl = SwigType_lstr (ctype, imarg);
3567- Wrapper_add_localv (cppfunc, imarg, cdecl , NULL );
3568- Delete (cdecl );
3566+ String *argcdecl = SwigType_lstr (ctype, imarg);
3567+ Wrapper_add_localv (cppfunc, imarg, argcdecl , NULL );
3568+ Delete (argcdecl );
35693569 }
35703570
35713571 // Add C++ -> C conversion typemaps for input args
0 commit comments