tmpfile: remove deprecated throw specifiers
* spot/misc/tmpfile.cc, spot/misc/tmpfile.hh: Remove throw specifier to suppress a deprecation warning from g++ 7.
This commit is contained in:
parent
4eebe94a1d
commit
aa457a204d
2 changed files with 6 additions and 11 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2013, 2015 Laboratoire de Recherche et Développement
|
// Copyright (C) 2013, 2015, 2017 Laboratoire de Recherche et
|
||||||
// de l'Epita (LRDE).
|
// Développement de l'Epita (LRDE).
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// This file is part of Spot, a model checking library.
|
||||||
//
|
//
|
||||||
|
|
@ -43,7 +43,6 @@ namespace spot
|
||||||
create_temporary_file(const char* prefix,
|
create_temporary_file(const char* prefix,
|
||||||
const char* suffix,
|
const char* suffix,
|
||||||
char** name)
|
char** name)
|
||||||
throw(std::bad_alloc, std::runtime_error)
|
|
||||||
{
|
{
|
||||||
static const char* tmpdir = get_tmpdir();
|
static const char* tmpdir = get_tmpdir();
|
||||||
static int tmpdirlen = tmpdir ? strlen(tmpdir) : 0;
|
static int tmpdirlen = tmpdir ? strlen(tmpdir) : 0;
|
||||||
|
|
@ -116,7 +115,6 @@ namespace spot
|
||||||
|
|
||||||
temporary_file*
|
temporary_file*
|
||||||
create_tmpfile(const char* prefix, const char* suffix)
|
create_tmpfile(const char* prefix, const char* suffix)
|
||||||
throw(std::bad_alloc, std::runtime_error)
|
|
||||||
{
|
{
|
||||||
char* name;
|
char* name;
|
||||||
int fd = create_temporary_file(prefix, suffix, &name);
|
int fd = create_temporary_file(prefix, suffix, &name);
|
||||||
|
|
@ -129,7 +127,6 @@ namespace spot
|
||||||
|
|
||||||
open_temporary_file*
|
open_temporary_file*
|
||||||
create_open_tmpfile(const char* prefix, const char* suffix)
|
create_open_tmpfile(const char* prefix, const char* suffix)
|
||||||
throw(std::bad_alloc, std::runtime_error)
|
|
||||||
{
|
{
|
||||||
char* name;
|
char* name;
|
||||||
int fd = create_temporary_file(prefix, suffix, &name);
|
int fd = create_temporary_file(prefix, suffix, &name);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2013, 2015 Laboratoire de Recherche et Développement
|
// Copyright (C) 2013, 2015, 2017 Laboratoire de Recherche et
|
||||||
// de l'Epita (LRDE).
|
// Développement de l'Epita (LRDE).
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// This file is part of Spot, a model checking library.
|
||||||
//
|
//
|
||||||
|
|
@ -112,16 +112,14 @@ namespace spot
|
||||||
/// The temporary file is created and left empty. If you need
|
/// The temporary file is created and left empty. If you need
|
||||||
/// to fill it, consider using create_open_tmpfile() instead.
|
/// to fill it, consider using create_open_tmpfile() instead.
|
||||||
SPOT_API temporary_file*
|
SPOT_API temporary_file*
|
||||||
create_tmpfile(const char* prefix, const char* suffix = nullptr)
|
create_tmpfile(const char* prefix, const char* suffix = nullptr);
|
||||||
throw(std::bad_alloc, std::runtime_error);
|
|
||||||
|
|
||||||
/// \brief Create a temporary file and leave it open for writing.
|
/// \brief Create a temporary file and leave it open for writing.
|
||||||
///
|
///
|
||||||
/// Same as create_tmpfile, be leave the file open for writing. The
|
/// Same as create_tmpfile, be leave the file open for writing. The
|
||||||
/// open_temporary_file::fd() method returns the file descriptor.
|
/// open_temporary_file::fd() method returns the file descriptor.
|
||||||
SPOT_API open_temporary_file*
|
SPOT_API open_temporary_file*
|
||||||
create_open_tmpfile(const char* prefix, const char* suffix = nullptr)
|
create_open_tmpfile(const char* prefix, const char* suffix = nullptr);
|
||||||
throw(std::bad_alloc, std::runtime_error);
|
|
||||||
|
|
||||||
/// \brief Delete all temporary files.
|
/// \brief Delete all temporary files.
|
||||||
///
|
///
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue