Skip to content

Commit d1a61d6

Browse files
committed
Merge branch 'master' into feature/dictionary
2 parents 5bc4f0b + 79ed353 commit d1a61d6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+609
-314
lines changed

.travis.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ branches:
77
except:
88
- /^v[0-9]/
99

10-
os:
11-
- linux
12-
- osx
1310

1411
language: cpp
1512

16-
compiler:
17-
- gcc
18-
- clang
13+
matrix:
14+
include:
15+
- os: linux
16+
compiler: gcc
17+
- os: osx
18+
compiler: clang
1919

2020
sudo: false
2121

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ before_build:
4343
(Get-Content source\base\build.h).replace('//{POV_AUTOBUILD_2}', $env:pov_autobuild_2) | Set-Content source\base\build.h
4444
(Get-Content source\base\build.h).replace('//{POV_AUTOBUILD_3}', $env:pov_autobuild_3) | Set-Content source\base\build.h
4545
(Get-Content source\base\build.h).replace('YOUR NAME (YOUR EMAIL)', $env:pov_authorized_by) | Set-Content source\base\build.h
46-
(Get-Content source\base\build.h).replace('#error Please fill in BUILT_BY, then remove this line', '') | Set-Content source\base\build.h
46+
(Get-Content source\base\build.h).replace('#error "Please fill in BUILT_BY, then remove this line"', '') | Set-Content source\base\build.h
4747
4848
build:
4949
project: windows/vs10/povray.sln

changes.txt

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,16 +203,35 @@ Fixed or Mitigated Issues Reported by Static Code Analysis
203203

204204
Coverity Scan defects targeted deliberately:
205205

206+
- CID 967251: 'Constant' variable guards dead code
207+
- CID 967254: 'Constant' variable guards dead code
208+
- CID 967261: Logically dead code
209+
- CID 967262: Logically dead code
210+
- CID 967273: Explicit null dereferenced
211+
- CID 967296: Parse Warning
212+
- CID 967297: Parse Warning
206213
- CID 967377: Uninitialized pointer field
207214
- CID 967400: Uninitialized pointer field
215+
- CID 967410: Structurally dead code
216+
- CID 967412: Structurally dead code
217+
- CID 1129008: Division or modulo by zero
208218
- CID 1129016: Uninitialized pointer read
209219
- CID 1129017: Uninitialized scalar variable
210220
- CID 1372548: Non-virtual destructor
211221
- CID 1372552: Unchecked return value
212222
- CID 1372555: Operands don't affect result
213223
- CID 1372556: Wrong operator used
214224
- CID 1372557: Wrong operator used
225+
- CID 1372558: Resource leak in object
226+
- CID 1372560: Logically dead code
215227
- CID 1372562: Non-array delete for scalars
228+
- CID 1372566: Unchecked dynamic_cast
229+
- CID 1372567: Unchecked dynamic_cast
230+
- CID 1372603: Resource leak
231+
- CID 1372604: Dereference before null check
232+
- CID 1372605: Dereference before null check
233+
- CID 1372606: Dereference before null check
234+
- CID 1372607: Dereference before null check
216235
- CID 1372608: Sizeof not portable
217236
- CID 1372626: Uninitialized scalar variable
218237
- CID 1372636: Uninitialized pointer field
@@ -231,6 +250,12 @@ Coverity Scan defects targeted deliberately:
231250
- CID 1372655: Structurally dead code
232251
- CID 1372656: Structurally dead code
233252
- CID 1372657: Unused value
253+
- CID 1373648: Out-of-bounds access
254+
- CID 1373649: Free of address-of expression
255+
- CID 1373651: Logically dead code
256+
- CID 1373652: Dereference before null check
257+
- CID 1373653: Write to pointer after free
258+
- CID 1373654: Use after free
234259

235260
Coverity Scan defects eliminated in passing:
236261

@@ -349,6 +374,7 @@ Reported via GitHub:
349374
- #49 ("Latest version from Git won't build with MS Visual Studio 2015")
350375
- #50 ("Make error in Ubuntu 14.04")
351376
- #53 ("Standard include files may mess up the language version")
377+
- #129 ("Port of FS331 - Intersection causes quadric to disappear")
352378

353379
Reported via FlySpray:
354380

@@ -361,6 +387,8 @@ Reported via FlySpray:
361387
- FS#316 ("inverse keyword does not work properly with fractals")
362388
- FS#317 ("problem with +D option at specific output file dimensions")
363389
- FS#318 ("method 3 (default) scattering media is too bright & causes artifacts when nested")
390+
- FS#331 ("Intersection causes quadric to disappear")
391+
- FS#336 ("#fopen w/o OPEN_TYPE crash povray (segfault)")
364392

365393
Reported via the Newsgroups:
366394

@@ -421,6 +449,10 @@ Reported via the Newsgroups:
421449
(2016-08-17, povray.binaries.scene-files, "Wrong normal direction on triangle{ }s")
422450
Bug in flat trianges that could cause interior_texture to show on the wrong side.
423451

452+
453+
(2016-10-20, povray.programming, "Re: solving polynomials")
454+
Misplaced `break` in polynomial solving code.
455+
424456
Reported via Windows Crash Reports:
425457

426458
- crash report #???, dump file #988

platform/unix/syspovtimer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void Delay(unsigned int msec)
8080
POV_ASSERT(msec < 1000); // On some systems, usleep() does not support sleeping for 1 second or more.
8181
usleep (msec * (useconds_t)1000);
8282
#else
83-
#error Bad compile-time configuration.
83+
#error "Bad compile-time configuration."
8484
#endif
8585
}
8686

source-doc/compiler.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ General Presumptions
66

77
While POV-Ray is being developed with portability high in mind, the C++ standard allows for some degrees of freedom that
88
we consider too exotic to cater to. We therefore presume all compilers and runtime environments to adhere to the
9-
following additional restrictions:
9+
following restrictions:
1010

1111
- **Char Size**: The `char` data type is currently presumed to be exactly 8 bits wide.
1212

@@ -19,7 +19,11 @@ following additional restrictions:
1919
separator, in include directives.
2020

2121
- **Integer Division**: Integer division is presumed to round towards zero. This also implies that the remainder (as
22-
computed by the modulus operator `%`) is negative (or zero) if the dividend and divisor have different sign.
22+
computed by the modulus operator `%`) is negative (or zero) if the dividend and divisor have different signs.
23+
24+
Failure to meet the above restrictions will cause in undefined behaviour.
25+
26+
Further restrictions may apply, but shall prompt a compile-time error if not satisfied.
2327

2428

2529
POVMS Additional Restrictions

source-doc/styleguide.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,10 @@ Miscellaneous Coding Rules
223223
- **Locale**: Do not tamper with the C locale (i.e. do not call `setlocale` or any other function doing the same job),
224224
as plenty of code in POV-Ray relies on it remaining set to the default.
225225

226+
- **Optimization**: Do not over-optimize your code. While we do want POV-Ray to be fast, we also want it to be
227+
reasonably maintainable, and modern compilers generally do a good enough job at automatic optimization that you can
228+
focus on keeping your code robust and easy to understand.
229+
226230

227231
Code Documentation
228232
==================

source/base/build.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
/// Specifies the person or organization responsible for this build.
5656
/// @attention Please set this to your real name, and/or include a working email or website address to contact you.
5757
#define BUILT_BY "YOUR NAME (YOUR EMAIL)"
58-
#error Please fill in BUILT_BY, then remove this line
58+
#error "Please fill in BUILT_BY, then remove this line"
5959
#endif
6060

6161
#endif // POVRAY_BASE_BUILD_H

source/base/colour.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ namespace pov_base
5454

5555
#else
5656

57-
#error TODO!
57+
#error "TODO!"
5858

5959
#endif
6060

source/base/colour.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ class GenericRGBColour
578578
mColour[BLUE] = col.mColour[2];
579579
}
580580
#else
581-
#error TODO!
581+
#error "TODO!"
582582
#endif
583583
};
584584

@@ -1736,7 +1736,7 @@ class GenericColour
17361736
mColour[2] = col.blue();
17371737
}
17381738
#else
1739-
#error TODO!
1739+
#error "TODO!"
17401740
#endif
17411741
};
17421742

source/base/image/gif.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ Image *Read (IStream *file, const Image::ReadOptions& options, bool IsPOTFile)
125125
{
126126
case EOF:
127127
throw POV_EXCEPTION(kFileDataErr, "Unexpected EOF reading GIF file");
128-
finished = true;
129-
break ;
128+
break;
130129

131130
case ';': /* End of the GIF dataset. */
132131
finished = true;

0 commit comments

Comments
 (0)