Clang warnings.

This commit is contained in:
Roman Telezhynskyi 2017-05-10 14:58:17 +03:00
parent 1cde0c7976
commit 1cf4e97b7d
3 changed files with 15 additions and 6 deletions

View File

@ -48,15 +48,17 @@
* Implements functions defined in DL_Writer for writing low
* level DXF constructs to an ASCII format DXF file.
*
* @para fname File name of the file to be created.
* @para version DXF version. Defaults to DL_VERSION_2002.
*
* @todo What if \c fname is NULL? Or \c fname can't be opened for
* another reason?
*/
class DXFLIB_EXPORT DL_WriterA : public DL_Writer
{
public:
/**
* @brief DL_WriterA contructor
* @param fname File name of the file to be created.
* @param version DXF version. Defaults to DL_VERSION_2002.
*/
explicit DL_WriterA(const char* fname, DL_Codes::version version=DL_VERSION_2000)
: DL_Writer(version), m_ofile(fname) {}
virtual ~DL_WriterA() {}

View File

@ -62,6 +62,11 @@
#include <sys/types.h>
#include <string.h>
#include "../vmisc/diagnostic.h"
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wsign-conversion")
/*
* Copy src to string dst of size siz. At most siz-1 characters
* will be copied. Always NUL terminates (unless siz == 0).
@ -139,5 +144,7 @@ inline size_t strlcat(char *dst, const char *src, size_t siz)
return(dlen + (s - src)); /* count does not include NUL */
}
QT_WARNING_POP
#endif /* ! __*BSD__ */
#endif // VALENTINA_STRLCPY_H

View File

@ -162,7 +162,7 @@ QPoint FancyTabBar::GetCorner(const QRect& rect, const Corner corner) const
break;
}
Q_ASSERT("that's impossible!");
qFatal("that's impossible!");
return QPoint();
}
@ -193,7 +193,7 @@ QRect FancyTabBar::AdjustRect(const QRect& rect, const qint8 offsetOutside, cons
break;
}
Q_ASSERT("that's impossible!");
qFatal("that's impossible!");
return QRect();
}
@ -216,7 +216,7 @@ QPoint FancyTabBar::AdjustPoint(const QPoint& point, const qint8 offsetInsideOut
break;
}
Q_ASSERT("that's impossible!");
qFatal("that's impossible!");
return QPoint();
}