Commit Graph

22 Commits

Author SHA1 Message Date
Chun-wei Fan
c138becc4d brz.c: Consider _WIN64 for 64-bit pointers too
The __ia64 and __x86_64__ macros are defined for GCC but not Visual
Studio, but actually this code path should also be taken for Visual
Studio when doing a 64-bit build (x86_64/x64 and aarch64/arm64, _WIN64
will be defined for these cases), since Windows is an LLP64 platform.

This will avoid C4311/C4312 warnings on Visual Studio builds, which are
often warnings of concern as we are dealing with pointers with differing
sizes on 32-bit and 64-bit Windows builds.
2022-02-13 15:19:43 +00:00
Chun-wei Fan
62bbd6cf17 brz.c: Avoid C4715 warnings
Later GLib versions assume that warning C4715 is an error as we want ot
be sure that functions that return a value do indeed return one by all
means.

Avoid this warning by adding  a 'return 0' in brz_search_packed(), it
might be pointless but does indeed avoid the warning.
2022-02-13 15:19:43 +00:00
Emmanuele Bassi
3d999b47e5 cmph: Handle fgets() return value
Newer versions of the GNU libc have started to warn if the result of the
call is unused.
2022-01-11 15:59:43 +00:00
Xavier Claessens
74ff43c47f Revert "Revert "Meson: Fix build when glib is built as subproject""
This reverts commit 42b7d634a9a7500dcc71651f71844148fc200be3.
2020-04-24 15:05:03 -04:00
Emmanuele Bassi
3d39d61e3d Revert "Meson: Fix build when glib is built as subproject"
This reverts commit ec00edd941953626ac027810f747847f68a71000.

The nightly run time does not have Meson 0.54.
2020-04-24 11:52:45 +01:00
Xavier Claessens
75a1bb1e13 Meson: Fix build when glib is built as subproject 2020-04-22 21:15:45 -04:00
Chun-wei Fan
1a19f05a0e build: Force-include msvc_recommended_pragmas.h on Visual Studio
By doing so, we essentially cover the various compiler flags that we
want to use for non-Visual Studio builds to check for warnings that
might cause real concern.

This also skips the checks for the various GCC-isque CFlag checks that
are scattered in the various build files on Visual Studio builds, since
they are essentially meaningless on Visual Studio builds.
2019-04-30 16:07:39 +08:00
Christoph Reiter
9b367e74ef ci: enable -Werror for msys2+meson 2019-01-01 18:06:47 +01:00
Tomasz Miąsko
b12b08df2f Cleanup strict-prototypes warnings 2018-12-20 17:34:38 +01:00
Christoph Reiter
13ba457c22 meson: add default compiler warning flags and enable -Werror on CI
This enables various compiler warnings project wide and disables the triggered
ones for each library/executable. This should give us roughly the same behaviour
as with autotools.

Tested with gcc8 and clang7.
2018-12-18 21:39:33 +00:00
Nirbheek Chauhan
3a78885133 meson: Use glib_dep and configinc for girepository
glib_dep is what is actually needed to #include <glib.h>, not
gobject_dep. It works incidentally with system gobject/glib but not
when built via subprojects.
2018-03-10 19:05:19 +05:30
Patrick Griffis
4c8c1a53b8 Initial work on meson port 2018-03-10 19:05:19 +05:30
Chun-wei Fan
b4df729c61 Fix code style
Make my last patch to this file conform to the code style in the rest
of this file.
2016-03-17 17:39:43 +08:00
Chun-wei Fan
4e43ed8112 cmph/bdz.c: Work Around MSVC 2012 x64 Compiler Bug
Due to an MSVC 2012 x64 compiler issue, the compiler generates bad code
for bdz.c, so the for loop in assign() continues running until the point
i falls below zero, causing an access violation when we try to do
curr_edge=queue[i]; (line 427 in bdz.c).  Address this issue by breaking
out of the loop at the end of it when i reaches 0 after doing the
necessary processing.

https://bugzilla.gnome.org/show_bug.cgi?id=733595
2016-03-16 22:48:18 +08:00
Colin Walters
3d2f1c2cd3 girepository: Drop executable bits from cmph .[ch] files
No reason for it.

https://bugzilla.gnome.org/show_bug.cgi?id=752931
2015-10-04 11:58:12 -04:00
Colin Walters
f4e33baf3b cmph: Remove leftover statement-without-effect
Compiler warning introduced from MSVC patches.
2012-10-30 18:23:09 -04:00
Chun-wei Fan
86b7d7cc99 cmph: Remove C99ism and other fixes
...So that it will compile on non-C99 compilers.  The changes are mainly
moving the variable declarations to the start of the resecptive blocks.

Also, replace the use of buflen in chd.c as it might not be defined for all
platforms, instead using packed_cr_size as it seems to represent the value
that is to be printed/displayed by the debugging output.

https://bugzilla.gnome.org/show_bug.cgi?id=681820
2012-10-27 12:06:09 -04:00
Johan Dahlin
0a96da9284 Make introspection compile with -Wall -Werror
Address all gcc warnings, -Werror is not enabled yet but at least
-Wall -Werror passes on my machine.
2012-04-09 14:19:23 -03:00
Dieter Verfaillie
522ebcd2d6 Windows port: cmph_time.h includes sys/resource.h which is not available on Windows.
So only include it when WIN32 is not defined.

https://bugzilla.gnome.org/show_bug.cgi?id=620566
2011-09-07 21:59:52 +02:00
Colin Walters
f9ba452081 cmph: Squash a lot of gcc -Wall compiler warnings
* Functions taking no parameters need to explicitly say (void).
* Mark some functions as static that are
* Comment out an unused function in bdz.c
* Change loop indicies "i" to be unsigned if our limit is unsigned
2010-12-03 16:03:32 -05:00
Colin Walters
9aadb1d583 cmph: Modify types to use GLib types
The 64 bit #ifdefs is just hackish and broken; e.g. it will fail
on ppc64/linux and WIN64.

Use the GLib typedefs, which I know are more correct.
2010-12-03 16:03:32 -05:00
Colin Walters
6178293a83 Import CMPH 1.0
This will be used for typelib indexing.  See README-CMPH-IMPORT.txt
for more information.
2010-12-03 16:03:31 -05:00