-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
HDFfile *hdf_file;
HDFgroup *hdf_group;
HDFdataset *hdf_dataset;
- int size;
+ size_t size;
int fd;
char * value;
char * buffer;
std::string text = "open failed";
es.text = CORBA::string_dup(text.c_str());
throw SALOME::SALOME_Exception(es);
- };
+ }
hdf_dataset->ReadFromDisk(buffer);
- if ( write(fd,buffer,size) <0) {
+ if ( write(fd,buffer,(unsigned int)size) <0) {
SALOME::ExceptionStruct es;
es.type = SALOME::INTERNAL_ERROR;
std::string text = "write failed";
es.text = CORBA::string_dup(text.c_str());
throw SALOME::SALOME_Exception(es);
- };
+ }
// Close the target file
::close(fd);
std::string cp_file_name(comp_file_name);
std::size_t index = cp_file_name.rfind("/");
- if (index != -1)
+ if (index != std::string::npos)
{
file_name = cp_file_name.substr(index+1);
path = cp_file_name.substr(0,index+1);
std::string cp_file_name(comp_file_name);
std::size_t index = cp_file_name.rfind("/");
- if (index != -1)
+ if (index != std::string::npos)
{
file_name = cp_file_name.substr(index+1);
path = cp_file_name.substr(0,index+1);
*/
//=============================================================================
void
-Salome_file_i::removeFile(const char* file_name)
+Salome_file_i::removeFile(const char* /*file_name*/)
{
MESSAGE("Salome_file_i::removeFile : NOT YET IMPLEMENTED");
}
Salome_file_i::getFilesInfos() {
Engines::files * infos = new Engines::files();
- infos->length(_fileManaged.size());
+ infos->length((CORBA::ULong)_fileManaged.size());
_t_fileManaged::iterator begin = _fileManaged.begin();
_t_fileManaged::iterator end = _fileManaged.end();
// see Advanced CORBA Programming with C++ pp 187-194
CORBA::Octet *buf;
buf = Engines::fileBlock::allocbuf(FILEBLOCK_SIZE);
- int nbRed = fread(buf, sizeof(CORBA::Octet), FILEBLOCK_SIZE, fp);
- aBlock->replace(nbRed, nbRed, buf, 1); // 1 means give ownership
+ size_t nbRed = fread(buf, sizeof(CORBA::Octet), FILEBLOCK_SIZE, fp);
+ aBlock->replace((CORBA::ULong)nbRed, (CORBA::ULong)nbRed, buf, 1); // 1 means give ownership //!< TODO: conversion from size_t to CORBA::ULong
return aBlock;
}