View Issue Details

IDProjectCategoryView StatusLast Update
0005170libmicrohttpdportabilitypublic2017-11-24 20:45
Reportervladimir.marek Assigned ToKarlson2k  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
PlatformSolarisOSSolarisOS VersionTrunk
Product Version0.9.52 
Target Version0.9.56Fixed in Version0.9.56 
Summary0005170: Compiling error
DescriptionHi,

After updating the Studio compiler we are getting this error:

/scratch/userland-gate/components/libmicrohttpd/libmicrohttpd-0.9.52/src/microhttpd/response.c", line 579: warning: assignment type mismatch:
        pointer to function(pointer to void, unsigned long long, pointer to char, unsigned int) returning int "=" pointer to void
"/scratch/userland-gate/components/libmicrohttpd/libmicrohttpd-0.9.52/src/microhttpd/response.c", line 580: operands have incompatible types:
         pointer to function(pointer to void) returning void ":" pointer to void


The fix seems to be to cast NULL to correct type.
TagsNo tags attached.
Attached Files
013.patch (660 bytes)   
This patch avoids compilation problems on recet Trunk.


--- libmicrohttpd-0.9.52/src/microhttpd/response.c	2017-10-19 14:26:09.439917401 +0000
+++ libmicrohttpd-0.9.52/src/microhttpd/response.c	2017-10-19 14:24:00.542128079 +0000
@@ -576,8 +576,8 @@ MHD_create_response_from_data (size_t si
       must_free = MHD_YES;
       data = tmp;
     }
-  response->crc = NULL;
-  response->crfc = must_free ? &free : NULL;
+  response->crc = (MHD_ContentReaderCallback)NULL;
+  response->crfc = must_free ? &free : (MHD_ContentReaderFreeCallback)NULL;
   response->crc_cls = must_free ? data : NULL;
   response->reference_count = 1;
   response->total_size = size;
013.patch (660 bytes)   

Activities

Karlson2k

2017-11-03 18:38

manager   ~0012541

Vladimir, thanks for report.

I highly recommend to use version 0.9.55 or git master, as they have a lot of fixes compared to 0.9.52.

I'll check with Developer Studio 12.6 and will fix warnings.

vladimir.marek

2017-11-05 23:11

reporter   ~0012567

I can't easily go to 0.9.55 as our functionality depends on modifications my
colleague did

https://github.com/oracle/solaris-userland/blob/master/components/libmicrohttpd/patches/003.patch

I'll have to make sense of the patch (it does not look too difficult) and see if
you would be interested in the code too. Until then I'm stuck with 0.9.52 :(

Thank you
__
  Vlad

Karlson2k

2017-11-06 12:22

manager   ~0012568

Vlad,

Actually, this is quite strage to use OS-local patches to add new OS-independ functionality to library and do not made an attempt to suggest new functionality to upstream.
You will end with outdated version without bugfixes or will spend a lot of time porting additional functionality to new version.
Version 0.9.52 has some known problems related to "HTTP UPGRADE" and I highly recommend to update MHD.

Some of mentioned functionality are breaking both API and ABI compatibility for MHD_http_unescape(). This make no sense. Furthermore, this breakage do not add anything. Moreover, two additional parameters are unused. Looks like someone decided to break library instead of writing two-lines local wrapper for lib function.

The rest of additional functionality is not clear. However, you could open new issue with detailed explanation of new functionality, its advantages, and patches.

--
Evgeny

Karlson2k

2017-11-06 12:44

manager   ~0012569

I checked history of MHD_http_unescape(). Current situation is result of local patches before merging upstream. Now you have to maintain ABI compatibility with existing software and patch new ported software to make it compatible with non-standard MHD API.
I suggest your local maintainer to fix things by moving to separate ABI version or by using some defines in header.

Karlson2k

2017-11-06 20:48

manager   ~0012571

Sorry, can't reproduce.
I'm using
$ cc -V
cc: Studio 12.6 Sun C 5.15 SunOS_i386 2017/05/30

I cannot get warning even with CFLAGS='-v -pedantic' .

Do you have some special build cc?

jmcp

2017-11-08 23:17

reporter   ~0012574

@Karlson2k: our common build environment compiler for libmicrohttpd is using Solaris Studio 12.4:


limoncello:jmcp $ /opt/solarisstudio12.4/bin/cc -V
cc: Sun C 5.13 SunOS_i386 2014/10/20

limoncello:jmcp $ pkg info developer/solarisstudio-124/cc
               Name: developer/solarisstudio-124/cc
            Summary: C Compiler
        Description: C Compiler supporting C99 standard
           Category: Development/C
              State: Installed
          Publisher: solarisstudio
            Version: 12.4
             Branch: 1.0.4.0
     Packaging Date: 10 November, 2015 at 06:16:38 pm
               Size: 9.21 MB
               FMRI: pkg://solarisstudio/developer/solarisstudio-124/cc@12.4-1.0.4.0:20151110T181638Z
        Project URL: http://www.oracle.com/technetwork/server-storage/solarisstudio/overview/index.html
Additional Keywords: Oracle Solaris Studio 12.4 C Compiler M6 M7 T7

Karlson2k

2017-11-09 20:08

manager   ~0012575

@jmcp, @vladimir.marek: reported code is already removed in git. However, similar warning was fixed in https tests.

Issue History

Date Modified Username Field Change
2017-11-03 11:04 vladimir.marek New Issue
2017-11-03 11:04 vladimir.marek File Added: 013.patch
2017-11-03 18:35 Karlson2k Assigned To => Karlson2k
2017-11-03 18:35 Karlson2k Status new => assigned
2017-11-03 18:38 Karlson2k Note Added: 0012541
2017-11-05 23:11 vladimir.marek Note Added: 0012567
2017-11-06 12:22 Karlson2k Note Added: 0012568
2017-11-06 12:44 Karlson2k Note Added: 0012569
2017-11-06 20:48 Karlson2k Note Added: 0012571
2017-11-08 23:17 jmcp Note Added: 0012574
2017-11-09 20:08 Karlson2k Note Added: 0012575
2017-11-09 20:09 Karlson2k Assigned To Karlson2k =>
2017-11-09 20:09 Karlson2k Status assigned => resolved
2017-11-09 20:09 Karlson2k Resolution open => fixed
2017-11-09 20:09 Karlson2k Fixed in Version => 0.9.56
2017-11-24 20:45 Christian Grothoff Assigned To => Karlson2k
2017-11-24 20:45 Christian Grothoff Status resolved => closed
2017-11-24 20:45 Christian Grothoff Target Version => 0.9.56