1    	// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2    	// vim: ts=8 sw=2 smarttab
3    	/*
4    	 * Ceph - scalable distributed file system
5    	 *
6    	 * Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
7    	 *
8    	 * This is free software; you can redistribute it and/or
9    	 * modify it under the terms of the GNU Lesser General Public
10   	 * License version 2.1, as published by the Free Software
11   	 * Foundation.  See file COPYING.
12   	 *
13   	 */
14   	
15   	#ifndef CEPH_MMDSSNAPUPDATE_H
16   	#define CEPH_MMDSSNAPUPDATE_H
17   	
18   	#include "msg/Message.h"
19   	
20   	class MMDSSnapUpdate : public Message {
21   	private:
22   	  inodeno_t ino;
(1) Event member_decl: Class member declaration for "snap_op".
Also see events: [uninit_member]
23   	  __s16 snap_op;
24   	
25   	public:
26   	  inodeno_t get_ino() const { return ino; }
27   	  int get_snap_op() const { return snap_op; }
28   	
29   	  bufferlist snap_blob;
30   	
31   	protected:
(2) Event uninit_member: Non-static class member "snap_op" is not initialized in this constructor nor in any functions that it calls.
Also see events: [member_decl]
32   	  MMDSSnapUpdate() : Message{MSG_MDS_SNAPUPDATE} {}
33   	  MMDSSnapUpdate(inodeno_t i, version_t tid, int op) :
34   	    Message{MSG_MDS_SNAPUPDATE}, ino(i), snap_op(op) {
35   	      set_tid(tid);
36   	    }
37   	  ~MMDSSnapUpdate() override {}
38   	
39   	public:
40   	  std::string_view get_type_name() const override { return "snap_update"; }
41   	  void print(ostream& o) const override {
42   	    o << "snap_update(" << ino << " table_tid " << get_tid() << ")";
43   	  }
44   	
45   	  void encode_payload(uint64_t features) override {
46   	    using ceph::encode;
47   	    encode(ino, payload);
48   	    encode(snap_op, payload);
49   	    encode(snap_blob, payload);
50   	  }
51   	  void decode_payload() override {
52   	    using ceph::decode;
53   	    auto p = payload.cbegin();
54   	    decode(ino, p);
55   	    decode(snap_op, p);
56   	    decode(snap_blob, p);
57   	  }
58   	private:
59   	  template<class T, typename... Args>
60   	  friend boost::intrusive_ptr<T> ceph::make_message(Args&&... args);
61   	};
62   	
63   	#endif
64