After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 699424 - "static CacheEntry * add_cache_entry" has no return value
"static CacheEntry * add_cache_entry" has no return value
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: mtp backend
git master
Other Linux
: Normal normal
: ---
Assigned To: Philip Langdale
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2013-05-01 21:25 UTC by Dominique Leuenberger
Modified: 2013-05-01 22:36 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dominique Leuenberger 2013-05-01 21:25:29 UTC
While building gvfs 1.17.0 in OBS (open build service), the build root policy check raises the compiler warning
  [  330s] gvfsbackendmtp.c:160:1: warning: no return statement in function returning non-void [-Wreturn-type
to an error (for known issues by using random return data)

The function in question is:
###
static CacheEntry *
add_cache_entry (GVfsBackendMtp *backend,
                 char *path,
                 uint32_t storage,
                 uint32_t id)
{
  CacheEntry *entry = g_new0 (CacheEntry, 1);
  entry->storage = storage;
  entry->id = id;
  DEBUG ("(II) add_cache_entry: %s: %u, %u",
         path, entry->storage, entry->id);
  g_hash_table_replace (backend->file_cache,
                        path, entry);
}
###
Comment 1 Philip Langdale 2013-05-01 22:36:00 UTC
commit 238a92496f5ab165b52f90d414379525cb262ee1
Author: Philip Langdale <philipl@overt.org>
Date:   Wed May 1 15:33:02 2013 -0700

    MTP: Fix compilation warning.
    
    The add_cache_entry helper's signature said it returned the CacheEntry
    but it doesn't.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=699424